Leetcode's reverse integer asks for us to reverse an integer, within a 32-bit integer range. For example: 123 becomes 321.
I reverse the number by making a new number and using modulus operator. I do the basic job first and then worry about overflowing the 32-bits at the end.
If you find it helpful and want to support me, you can buy me a coffee. Don't feel obliged though... https://buymeacoffee.com/davekirkwood