Блог пользователя aya1909

Автор aya1909, история, 3 года назад, По-английски

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

  • Проголосовать: нравится
  • 0
  • Проголосовать: не нравится

»
3 года назад, # |
  Проголосовать: нравится +1 Проголосовать: не нравится

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.