Skip to content

Latest commit

 

History

History

reverseint

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

Solving Steps:

1- Check for negative

2 - If x is negative, convert it to positive

3- Convert x to string as []byte

4- Reverse string in []byte

5- Convert []byte to regular string

6- If x is negative add minus (-)

7- Convert back to integer

8- Check for int32 range

9- Return reversed integer