Search
⌘K
Get Premium
Leetcode 166. Fraction to Recurring Decimal
Convert a fraction to its decimal string form, enclosing any repeating fractional cycle in parentheses. The core challenge is simulating long division while handling sign and overflow and detecting repeating remainders (e.g., by mapping each remainder to its decimal index).
Asked at:
Meta
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
All Regions
Mid April, 2025
Meta
Senior
Asked the complexity of the algorithm related to the inputs (num/den)
Comments
Hello Interview Premium
Your account is free and you can post anonymously if you choose.