Myntra interview question

Find all palindromic substrings within a given string.

Interview Answer

Anonymous

14 Oct 2019

Round: 2; Level: medium For every letter in the string, match letters on its left and right side one by one. Increment a counter if there is a match, stop matching at the first mismatch for each letter. Also match starting from adjacent letters rather than letters on either side of each letter.