XYZ interview question

Multithreading concept,oops,2 coding questions, like ascending order, palindrome