I made a second attempt in the “Intersection of Two Sorted Arrays” problem from my growth plan document, except I wasn’t able to come up with both optimal solutions within 35 minutes, because I messed up with the binary search approach.

This is the link to the challenge on LeetCode:

(However, this is an unsorted version of the problem)

From reading the solutions, what I don’t understand is why in the BFS function, we need to have an explicit parameter for the start index, and when update high in the while loop, we don’t offset by -1.

https://fellows.pathrise.com/knowledge/guides/problem-find-intersection-of-two-sorted-integer-arrays