Please Login To Continue

Breadth First Search or BFS for a Graph

Lesson 5 of 10 • 0 upvotes • 9:27mins

Avatar

Rakesh Naga Chinta

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.

Continue on app
1

Top 10 Algorithms in Interview Questions: Introduction

6:31mins

2

Dynamic Programming Floyd Warshall Algorithm

10:19mins

3

Depth First Search or DFS for a Graph

5:47mins

4

Method 2 Linked List (make visited nodes)

5:47mins

5

Breadth First Search or BFS for a Graph

9:27mins

6

Boggle (Find all possible words in a Board of Characters)

8:21mins

7

Kruskal's Minimum Spanning Tree Algorithm

5:53mins

8

Given a singly Linked List and a position, delete a Linked List node at the given position

7:45mins

9

Disjoint set or (union - find) Algorithm of a Graph

10:07mins

10

Finding Bridges in a graph intro to the Algorithm

11:39mins

Crack Campus Placements with Unacademy

Get subscription and access unlimited live and recorded courses from India's best educators
Structured syllabus
Structured syllabus
Daily live classes
Daily live classes
Ask doubts
Ask doubts
Tests & practice
Tests & practice

Similar Plus Courses

thumbnail
ENROLL
HinglishPhysics

Detailed Course on Basic Maths for Physics

Prateek Jain

Unacademy is India’s largest online learning platform. Download our apps to start learning


Starting your preparation?

Call us and we will answer all your questions about learning on Unacademy

Call +91 8585858585
Company
About usShikshodayaCareersBlogsPrivacy PolicyTerms and Conditions
Products
Learner appLearner appEducator appEducator appParent appParent app