4W interview question

Reverse string, palindrome, prime number, pattern, sort array