Approach to solve graph problems with BFS and DFS using JavaScript | Hacker News Reader