Ocado Technology interview question

Write an algorithm to search for palindromes, explaining the time and space complexity