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

Автор tshikhar_20, история, 22 месяца назад, По-английски

Given a string find any combination of concatenated palindromic substrings.

or

Given a string cut it into pieces such that all pieces are palindrome and concatenating them gives whole string. No rearrangement is possible.

1 more simple condition is there all palindromic substrings should have equal number of zeroes and ones.

if answer is possible provide where you made cuts.

Eg. 1001101101 if we split as (1001)(101101)

1001 split as (1001)

1100 Answer is no


(1)(0)(1)(0) these kind of splitting not possible

Bcz there is one more simple condition that in each palindromic substring no of zeroes and ones should be equal

Полный текст и комментарии »

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