Skip to main content
Fraction to Recurring Decimal | AlgoCracked
AlgoCracked
ProblemsFraction to Recurring Decimal
Medium25.0% acceptance
Hash TableMathString

Fraction to Recurring Decimal

Given two integers numerator and denominator , return the value of the fraction as a string. If the fractional part repeats, wrap the repeating block in parentheses. For example 1/2 is 0.5 and 2/3 is 0.(6) . Input format Input is [numerator, denominator] , e.g. [4, 333] .

Loading workspace…