Dividing the Gold Bar for Daily Payments

Paying Worker With Gold Bar Segments is a medium quant interview question on Brain Teasers.

Difficulty Medium Topic Brain Teasers

This puzzle asks how to split a single, segmented gold bar so that you can pay a worker an exact, increasing daily wage over a fixed number of days, while being allowed only a very limited number of cuts. The twist is that earlier pieces the worker has already received can later be handed back as "change," so the same physical pieces may move between employer and worker multiple times. The setup is a classic brain teaser, often used in interviews for quantitative and logic-focused roles, to test whether a candidate can recognize structure in what initially looks like a simple cutting-and-counting problem.

Solving it draws on positional number systems and efficient representation of all integers in a range using a minimal set of building blocks. Strong answers typically connect the idea of piece sizes to binary-like decompositions and explain why those sizes are sufficient to generate every required daily total through combinations and exchanges. Interviewers look for comfort with abstraction, willingness to generalize beyond the specific numbers, and clarity in reasoning about constraints and optimality, rather than trial-and-error enumeration.

What it tests

The core structure here is the use of positional number systems—specifically, binary representation—to efficiently construct all numbers in a range using the fewest possible building blocks. By breaking the `7-segment bar` into pieces of sizes that are powers of two (1, 2, 4), you ensure that any integer from 1 to 7 can be formed as a sum of these pieces, just as any number can be written in binary using 0s and 1s. This works because each power of two represents a unique 'place value,' and their combinations are sufficient to represent every number up to the sum of all the pieces. The reason this pattern holds is that binary decomposition is the minimal way to cover all numbers in a range with the fewest distinct summands, and it allows for flexible recombination (including giving and taking back pieces as 'change').

Practise this question with written feedback, or hear it in a spoken mock interview.

Get started free