Skip to content
Courses
DSA to Development
Get IBM Certification
Newly Launched!
Master Django Framework
Become AWS Certified
For Working Professionals
Interview 101: DSA & System Design
Data Science Training Program
JAVA Backend Development (Live)
DevOps Engineering (LIVE)
Data Structures & Algorithms in Python
For Students
Placement Preparation Course
Data Science (Live)
Data Structure & Algorithm-Self Paced (C++/JAVA)
Master Competitive Programming (Live)
Full Stack Development with React & Node JS (Live)
Full Stack Development
Data Science Program
All Courses
Tutorials
Data Structures & Algorithms
ML & Data Science
Interview Corner
Programming Languages
Web Development
CS Subjects
DevOps And Linux
School Learning
Practice
Build your AI Agent
GfG 160
Problem of the Day
Practice Coding Problems
GfG SDE Sheet
Contests
Accenture Hackathon (Ending Soon!)
GfG Weekly [Rated Contest]
Job-A-Thon Hiring Challenge
All Contests and Events
DSA
Practice Problems
Python
C
C++
Java
Courses
Machine Learning
DevOps
Web Development
System Design
Aptitude
Projects
Sign In
▲
Similar Topics
DSA
22.3k+ articles
Mathematical
7.7k+ articles
Competitive Programming
2.3k+ articles
Algorithms
2k+ articles
Searching
1.7k+ articles
Tree
1.4k+ articles
Matrix
1.2k+ articles
Graph
940+ articles
Queue
360+ articles
DFS
340+ articles
BFS
210+ posts
Popular Articles
Recent Articles
Difference between BFS and DFS
Last Updated: 18 October 2024
Breadth-First Search (BFS) and Depth-First Search (DFS) are two fundamental algorithms used for traversing or searching graphs and trees. Th
...read more
Algorithms
BFS
DFS
Difference Between
DSA
Shortest path in an unweighted graph
Last Updated: 24 May 2024
Given an unweighted, undirected graph of V nodes and E edges, a source node S, and a destination node D, we need to find the shortest path f
...read more
Graph
BFS
cpp-queue
DSA
Water Jug problem using BFS
Last Updated: 14 September 2024
Given two empty jugs of m and n litres respectively. The jugs don't have markings to allow measuring smaller quantities. You have to use the
...read more
Graph
Technical Scripter
Competitive Programming
BFS
DSA
Similar Topics
DSA
22.3k+ articles
Mathematical
7.7k+ articles
Competitive Programming
2.3k+ articles
Algorithms
2k+ articles
Searching
1.7k+ articles
Tree
1.4k+ articles
Matrix
1.2k+ articles
Graph
940+ articles
Queue
360+ articles
DFS
340+ articles
Best First Search (Informed Search)
Last Updated: 20 March 2025
Best First Search is a heuristic search algorithm that selects the most promising node for expansion based on an evaluation function. It pri
...read more
Graph
Searching
Technical Scripter
BFS
DSA
Iterative Deepening Search(IDS) or Iterative Deepening Depth First Search(IDDFS)
Last Updated: 20 September 2024
There are two common ways to traverse a graph, BFS and DFS. Considering a Tree (or Graph) of huge height and width, both BFS and DFS are not
...read more
Graph
BFS
DFS
DSA
BFS vs DFS for Binary Tree
Last Updated: 19 February 2024
Breadth-First Search (BFS) and Depth-First Search (DFS) for Binary Trees are ways to traverse nodes of the Binary Tree. This article aims to
...read more
Tree
BFS
DFS
DSA
Top 10 Algorithms and Data Structures for Competitive Programming
Last Updated: 10 September 2024
In this post, we will discuss Important top 10 algorithms and data structures for competitive coding.Topics :Graph algorithmsDynamic program
...read more
GBlog
Competitive Programming
BFS
Segment-Tree
Binary Indexed Tree
sieve
Modular Arithmetic
DFS
Topological Sorting
BIT
number-theory
GBlog-Competitive-Programming
DSA
Top 10 Algorithms in Interview Questions
Last Updated: 25 February 2025
Getting ready for a tech job interview? Algorithms are really important! Companies often ask questions that require problem-solving skills.
...read more
Interview Tips
Algorithms
interview-preparation
placement preparation
BFS
DFS
Topological Sorting
Data Structures
Interview-Questions
DSA
Interview Questions
Connected Components in an Undirected Graph
Last Updated: 16 April 2025
Given an undirected graph, the task is to return all the connected components in any order.Examples:Input: Consider the following graph Outp
...read more
Graph
BFS
DFS
graph-connectivity
DSA
Print Nodes in Top View of Binary Tree
Last Updated: 23 December 2024
Given a binary tree. The task is to find the top view of the binary tree. The top view of a binary tree is the set of nodes visible when the
...read more
Tree
Amazon
Samsung
Walmart
Paytm
Queue
Hash
BFS
tree-view
DSA
Snake and Ladder Problem
Last Updated: 18 April 2024
Given a snake and ladder board, find the minimum number of dice throws required to reach the destination or last cell from the source or 1st
...read more
Amazon
Flipkart
Graph
Belzabar
MAQ Software
BFS
Shortest Path
DFS
DSA
Detect cycle in an undirected graph
Last Updated: 07 April 2025
Given an undirected graph, the task is to check if there is a cycle in the given graph.Examples:Input: V = 4, edges[][]= [[0, 1], [0, 2], [1
...read more
Amazon
Adobe
Oracle
Flipkart
Samsung
Graph
MakeMyTrip
BFS
DFS
union-find
graph-cycle
DSA
Articulation Points (or Cut Vertices) in a Graph
Last Updated: 08 April 2025
Given an undirected graph with V vertices and E edges (edges[][]), Your task is to return all the articulation points in the graph. If no su
...read more
Graph
BFS
DFS
graph-connectivity
DSA
Check whether a given graph is Bipartite or not
Last Updated: 16 April 2025
Given a graph with V vertices numbered from 0 to V-1 and a list of edges, determine whether the graph is bipartite or not.Note: A bipartite
...read more
Samsung
Graph
BFS
DFS
Graph Coloring
DSA
Breadth First Search or BFS for a Graph
Last Updated: 21 April 2025
Given aundirected graphrepresented by an adjacency listadj, where eachadj[i]represents the list of vertices connected to vertexi. Perform aB
...read more
Graph
Queue
BFS
Data Structures
graph-basics
DSA
1
2
3
4
5
6
7
8
>>
Last
1
2
3
4
5
6
>>
Last
1
2
3
4
>>
Last
We use cookies to ensure you have the best browsing experience on our website. By using our site, you acknowledge that you have read and understood our
Cookie Policy
&
Privacy Policy
Got It !