Tutorial for how to solve the common coding interview question “Find the Duplicate Number ” [LeetCode 287].
In part 1, I’ll explain how to incrementally optimize the solution from naive to optimal.
You can find the question here -
https://leetcode.com/problems/find-th...
This question has been asked in Amazon, Facebook and Google software engineering interviews (according to LeetCode)