Lesson 5 of 10 • 0 upvotes • 9:27mins
Breadth First Traversal (or Search) for a graph is similar to Breadth First Traversal of a tree (See method 2 of this post). The only catch here is, unlike trees, graphs may contain cycles, so we may come to the same node again. To avoid processing a node more than once, we use a boolean visited array. For simplicity, it is assumed that all vertices are reachable from the starting vertex.
10 lessons • 1h 21m
Top 10 Algorithms in Interview Questions: Introduction
6:31mins
Dynamic Programming Floyd Warshall Algorithm
10:19mins
Depth First Search or DFS for a Graph
5:47mins
Method 2 Linked List (make visited nodes)
5:47mins
Breadth First Search or BFS for a Graph
9:27mins
Boggle (Find all possible words in a Board of Characters)
8:21mins
Kruskal's Minimum Spanning Tree Algorithm
5:53mins
Given a singly Linked List and a position, delete a Linked List node at the given position
7:45mins
Disjoint set or (union - find) Algorithm of a Graph
10:07mins
Finding Bridges in a graph intro to the Algorithm
11:39mins