I am trying to do an algorithm problem in LeetCode (https://leetcode.com/problems/find-the-duplicate-number/).
Below is my method to solve this, which uses binary sea