Increase 2 consecutive characters solution codechef – Chef has 22 strings AA and BB of equal length NN. Both strings contain lowercase english alphabets only. Chef can perform several moves on string AA. In one move, Chef has to: Select an index i (1≤i≤N−1)i (1≤i≤N−1). Replace A[i]A[i] with (A[i]+1)(A[i]+1). Replace A[i+1]A[i+1] with (A[i+1]+1)(A[i+1]+1).

Increase 2 consecutive characters solution codechef Chef has 22 strings AA and BB of equal length NN. Both strings contain lowercase english alphabets only. Chef can perform several moves on string AA. In one move, Chef has to: Select an index i (1≤i≤N−1)i (1≤i≤N−1). Replace A[i]A[i] with (A[i]+1)(A[i]+1). Replace A[i+1]A[i+1] with (A[i+1]+1)(A[i+1]+1). For example, if A=abczeA=abcze, a valid move would be to select index 33. This way the string becomes abdaeabdae after performing the move. Note … Read more