Skip to content

Latest commit

 

History

History
19 lines (10 loc) · 303 Bytes

README.md

File metadata and controls

19 lines (10 loc) · 303 Bytes

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