aya1909's blog

By aya1909, history, 2 months ago, In English

Given two binary strings of equal length (eg. "10101" and "10010") we had to find whether we can convert string 1 to string 2 by performing following operations:

reverse substring of length 2 reverse substring of length 2 reverse substring of length 2

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

»
2 months ago, # |
  Vote: I like it +1 Vote: I do not like it

Do we have to perform "reverse substring of length 2" 3 times? By the way string 1 has 3 one and string 2 has 2 one. So it is impossible to convert it by only reversing. PS: It would be better if you can provide the problem link.