โ† Samsung questions

Fishing Spots Minimum Walking Distance

Filed under Samsung

The question

Given 3 gates with specific positions and numbers of waiting fishermen, and fishing spots from 1 to N, find the sum of the minimum walking distance for all fishermen. Only one gate can be opened at a time, all its fishermen must occupy spots before the next gate opens, and the last fisherman assigned to a spot among two closest ones should be assigned to minimize walking distance.

No write-up yet. Related questions below have one.

Related Samsung questions

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