Leetcode Bfs And Dfs Algorithm In Python