Angel One interview question

Longest palindrome, question on BFS implementation