palindrome
input:hi karthika in
hi " " karthika " " in
in " " karthika " " hi
output:in karthika hi
sometimes higest element can be comes last so that we add
second=largest
second=first -> for finding 2nd largest num upto the indexed element
first=num -> for finding largest num upto the indexed element