Company: Samsung_5thaug
Difficulty: medium
Minimize Fisherman Movement Problem Description A fishery has N fishing spots laid out in a single row along a river, numbered 1 to N from left to right. The fishery has exactly 3 gates . Every gate stands next to one particular fishing spot, and a group of fishermen is already waiting in front of each gate. Every fisherman ends up on exactly one spot, and spots are taken like this: Step 1. To avoid crowding, the gates are opened one at a time . You decide the order in which the three gates are opened. Step 2. While a gate is open, the fishermen waiting at that gate walk in one after another . Each of them goes to a spot that is closest to that gate among the spots that are still free, and stays there. Step 2a. Walking from a gate to the spot the gate stands next to costs 1 metre. Step 2b. Every further spot to the left or to the right costs 1 extra metre. So if a gate stands next to spot 4 , reaching spot 4 costs 1 metre, reaching spot 3 or spot 5 costs 2 metres, reaching spot 2 or sp