Data structure and algorithm notes and practices from books, leetcode, etc.
- You can iterate through the digits of a number by using modulus (
% 10
) to get each digit and integer division(// 10
) to remove it, without needing to convert the number to a string.