dsa1 min read
Keys and Rooms — DFS/BFS Graph Reachability
Determine if all rooms are reachable. Start from room 0, DFS using keys found in each room to unlock new rooms.
Read →
webcoderspeed.com
2 articles
Determine if all rooms are reachable. Start from room 0, DFS using keys found in each room to unlock new rooms.
Check if you can reach a 0 in the array by jumping arr[i] steps left or right. BFS/DFS from start index.