Integer Division ⧉
If we find some number x is equal to others we've seen when divided by d, our new number will create a pair with each of the previous numerators that map to x/d. Therefore, we simply add the previous count and continue.
Keep a map of numerator : quotient pairs for constant access to previous divisions.
If you found this solution helpful, consider leaving a star!