In this video we are solving a popular interview question at top tech companies Google, Facebook, Microsoft, and others.
This is a pretty simple question but there are a lot of edge cases to work through so interviewers like this question because it's easy to miss the small details and takes careful forethought to define the problem space before writing your code.