Reverse the number by different approach
Modulo and integer divide to get the number
- Simple, arithmetic operation required
- Dealing with long number seems to be very hard to achieve
Convert number to string and use built-in function to reverse the string then return
- Dealing with big number is a piece of cake
- Some programming language doesn't have built-in
reverse
string function - Require some simple knowledge when dealing with string
Instead of using built-in function, we implement our own reverse
function
- Like using built-in function
- Dealing string in some low-level programming language may require strong basic CS knowledge