Company: Amazon_july
Difficulty: medium
Code Question 1 Problem Description Amazon would like to enforce a password policy that when a user changes their password, the new password cannot be similar to the current one. To determine whether two passwords are similar, they take the new password, choose a set of indices and change the characters at these indices to the next cyclic character exactly once. Character 'a' is changed to 'b', 'b' to 'c' and so on, and 'z' changes to 'a'. The password is said to be similar if after applying the operation, the old password is a subsequence of the new password. The developers come up with a set of n password change requests, where newPasswords denotes the array of new passwords and oldPasswords denotes the array of old passwords. For each pair newPasswords[i] and oldPasswords[i] , return "YES" if the passwords are similar, that is, oldPasswords[i] becomes a subsequence of newPasswords[i] after performing the operations, and "NO" otherwise. Note: A subsequence is a sequence that can be d