Pregunta de entrevista de MathWorks

Javascript questions on array and trees. Palindrome and string question.