Bloomberg interview question

What is the difference between c++ and Java? What are the primitive data types in Java? What is the JVM and the Garbage Collector? Implement a method to decide whether a string is palindrome or not.

Interview Answer

Anonymous

12 Mar 2015

you can solve the problem by using two pointers on the string . One at the beginning and one at the end. the first moves to the right and the other one moves to the left and compare the string's characters.