Series: #shortestdistance – Shortest distance in unweighted graphs Posted on August 5, 2019July 26, 2020 by braindenny Shortest distance in a graph Name Example When BFS examine the target before pushing, or wait after poping at the next level? What if starting and ending point is the same? Initialize level with 0 or 1? Link: Why can’t DFS be used to find shortest paths in unweighted graphs? CheatSheet: Leetcode For Code Interview CheatSheet: Common Code Problems & Follow-ups See all series problems: #shortestdistance LeetCode: Shortest Word Distance IIILeetCode: Shortest Way to Form StringLeetCode: Shortest Path with Alternating ColorsLeetCode: Shortest Path Visiting All NodesLeetCode: Shortest Path in Binary MatrixLeetCode: Shortest Distance to Target ColorLeetCode: Shortest Distance to a Character See more blog posts. Post Views: 0