Tesla interview question

max islands leetcode question (BFS/DFS)