GGK Tech interview question

Water balancing logical and reasoning question