Amazon Interview Question

They gave Palindromic Substring question