Skip to content

Prepare For Coder Interview – Denny

  • Basic
  • Medium
  • Hard
  • Architect
  • Life

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 III
  • LeetCode: Shortest Way to Form String
  • LeetCode: Shortest Path with Alternating Colors
  • LeetCode: Shortest Path Visiting All Nodes
  • LeetCode: Shortest Path in Binary Matrix
  • LeetCode: Shortest Distance to Target Color
  • LeetCode: Shortest Distance to a Character

See more blog posts.

linkedin
github
slack

Post Views: 0
Posted in SeriesTagged series

Post navigation

LeetCode: Shortest Path in Binary Matrix
LeetCode: Evaluate Division

Leave a Reply Cancel reply

Your email address will not be published.

Tags

#array #backtracking #bfs #binarytree #bitmanipulation #blog #classic #codetemplate #combination #dfs #dynamicprogramming #game #graph #greedy #heap #inspiring #interval #linkedlist #manydetails #math #palindrome #recursive #slidingwindow #stack #string #subarray #trie #twopointer #twosum binarysearch editdistance hashmap intervaldp knapsack monotone oodesign presum rectangle redo review rotatelist series sql treetraversal unionfind

Recent Posts

  • a
  • a
  • a
  • a
  • a

Recent Comments

    Archives

    Categories

    • Amusing
    • Basic
    • Easy
    • Hard
    • Life
    • Medium
    • Resource
    • Review
    • Series
    • Uncategorized
    Proudly powered by WordPress | Theme: petals by Aurorum.