Solve palindrome and list tasks | Reddit Interview Question