Given a string A of size N, find and return the longest palindromic substring in A.
Substring of string A is
A[i...j] where 0 <= i <= j < len(A)
A string which reads the same backwards. More formally, A is palindrome if reverse(A) = A.
Incase of conflict, return the substring which occurs first ( with the least starting index).
1 <= N <= 6000
First and only argument is a string A.
Return a string denoting the longest palindromic substring of string A.
A = "aaaabaaa"
We can see that longest palindromic substring is of length 7 and the string is "aaabaaa".
NOTE: You only need to implement the given function. Do not read input, instead use the arguments to the function. Do not print the output, instead return values as specified. Still have a question? Checkout Sample Codes for more details.