Maximize the Minimized Three-Server Difficulty Split
Asked at Goldman Sachs · Coding Questions · Difficulty: Hard · Last asked Nov 25, 2025
A deployment has `n` software modules, each with an integer difficulty rating, and exactly three servers numbered 1, 2 and 3. You decide which server runs each module. A checker then picks one module from each server and measures the spread `|d1 - d2| + |d2 - d3|`, where `dk` is the rating of the module picked from server `k`. The checker always picks the three modules that make this spread as small as possible. Choose the split that makes the checker's smallest spread as large as possible, and return that value.
Loading the problem…
More Goldman Sachs interview questions
- Probability and Statistics Drill: Eight Numeric Problems
- Combine Sorted Linked Lists
- Goldman Hirevue Behavioral Bank (6 Questions)
- Client Request That Breaks Firm Policy Before a Deal Closes
- Explain Recursion to a Non-CS Audience
- Implement a Deque From Scratch