reverse integer solution