Boats Group Interview Question

Coding Round was a Leetcode Medium difficulty problem