← Goldman Sachs questions
CodingReported in a candidate post, Jul 2025

Print a fraction with the recurring part in brackets

Filed under Goldman Sachs

Given a numerator and a denominator (non-zero), return the fraction as a decimal string. If the fractional part repeats, enclose the repeating digits in parentheses. For example 1/3 gives 0.(3), 2/5…

You've read your 3 free write-ups

Sign up free to keep reading. Your account opens the first 10 questions of every company.

Related Goldman Sachs questions

Collected from public candidate posts and coding forums. Updated Nov 2026.