Samsung Electronics Interview Question

Three fisherman problem which you will find on geekforgeeks.