InterviewDB
Experience
Goldbar Sharing: Distribute Gold Bars Among Players to Minimize Maximum Envy
Onsite
Interview Experience
Problem You have n gold bars with given weights and k players. Distribute all bars among the players such that the difference between the heaviest and lightest player's total is minimized. Each bar goes to exactly one player. Example: Follow-ups Is this problem NP-hard in general? What constraints make it tractable (e.g., small n, small k)? How would you approach this with dynamic programming if n <= 20? Discuss a greedy approximation: assign each bar to the player with the current lowest total.…
Full Details
🔒
Unlock all Sofi questions
Full insider details, leaked discussions, and candidate experiences.
or every company, $100/year →About This Question
This is a candidate experience report from a sofi interview during the onsite round.
It covers the following topics: Coding, Greedy, Onsite, Dynamic Programming .