1.1.1. If num = 0, return 0. 2.2.2. Otherwise return 1 + (num - 1) % 9. This runs in constant time and uses the modular property.