Jump to content
xisto Community

songs2enjoy

Members
  • Content Count

    3
  • Joined

  • Last visited

Everything posted by songs2enjoy

  1. In java It 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
  2. 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
×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.