Hello all,
this question was asked in an interview..
you have a string xCy consists only 'A' and 'B' , where x,C and y all are string but y is in reverse order of x,i.e., if x is 'ABAAB' then y should be 'BAABA'.
I was to find out whether a particular string is of the form of xCy or not. I could only access next character of string. ( so it was not possible to compare first element to last one, then second to second last and so on)
Thanx and Regards,
Suyash
this question was asked in an interview..
you have a string xCy consists only 'A' and 'B' , where x,C and y all are string but y is in reverse order of x,i.e., if x is 'ABAAB' then y should be 'BAABA'.
I was to find out whether a particular string is of the form of xCy or not. I could only access next character of string. ( so it was not possible to compare first element to last one, then second to second last and so on)
Thanx and Regards,
Suyash
Comment