xecute's blog

By xecute, history, 9 years ago, In English

There are two string A and B. In one move, one carry out either of the following two operations. 1)Swap two adjacent elements of either A and B 2)Swap the first and last element of either A and B. What is the minimum number of operations required so that the two strings become alike. If n=length of strings and A and B, then 1<=n<=10^5. Any pointers on how to approach this problem ?

  • Vote: I like it
  • 0
  • Vote: I do not like it