Example
suppose string given is 'abccbaad'
Then, sub-string will be 'abc' and its reverse will be 'cba'
both exist in the given string.
how will you find both of them ?
please provide code snippets if possible.
Note: length of substring > 1
update: characters used in a substring from a position should not be used again in reversed string.
For eg. suppose 'c' from index 2 is used in substring then, it again should not be used in reversed string but 'c' from index 3 is allowed.