 <p>You don't have to convert it to integer. You can check it from the string.</p> <p>Take the first character and the last character compare those .</p> <p>Iterate the first pointer +1 and the last pointer -1 then compare.</p> <p>Continue this process upto you are in middle of the string.</p>