Data Structures -- String -- Palindrome Check if a string is a palindrome... in Programming Posted August 31, 2008 · Report reply In javaIt can be like this // lets take testString="SAS"boolean isPalindrome(String testString){int length=testString.length();for(int i=0;i<length/2;i++) if(testString[i]!=testString[length-i+1]) return false;//else it's palindromereturn true;} Hope this works faster
Data Structures -- Linked List Find the nth last element in linked list. in Programming Posted August 31, 2008 · Report reply reverse the list and find the 5th element from the start,Not simple though just an idea.Varalu,Can u plz post what's the simple idea ?Thanks
Datastructures And Algorithms in General Discussion Posted August 30, 2008 · Report reply Nice post,Thanks for the post
Data Structures -- String -- Palindrome Check if a string is a palindrome...
in Programming
Posted · Report reply
In java
It can be like this
Hope this works faster