We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
Well it is true i do not know maths really well
And saying that function for palindrome has a flaw was also wrong considering the question requires to check palindrome for integers.
I was just working with your algo and like a idiot i passed 010 to It and got a wrong answer .
Then after debugging it for a while i found out that java considers leading zero as octal. So i thought for palindrome , working on it as a string is better than working on it as integer
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Java Lambda Expressions
You are viewing a single comment's thread. Return to all comments →
Well it is true i do not know maths really well And saying that function for palindrome has a flaw was also wrong considering the question requires to check palindrome for integers. I was just working with your algo and like a idiot i passed 010 to It and got a wrong answer . Then after debugging it for a while i found out that java considers leading zero as octal. So i thought for palindrome , working on it as a string is better than working on it as integer