leetcode
934 Shortest Bridge
link: Shortest Bridge Thought Since the question ask for shortest, so BFS probabely the best algorithms to solve it. But notice, I will use 2 bfs funciton, one to find the edge of first island, the other one is to reach another island based on first edge. BFS1: input: start