Question
In Breadth-First Search (BFS), what data structure is
typically used to keep track of the nodes to be explored?Solution
Breadth-First Search (BFS) uses a queue to keep track of the nodes to be explored. A queue follows the First-In-First-Out (FIFO) principle, ensuring that nodes are explored level by level. Nodes are added to the queue when they are encountered, and the front node is explored first before moving to its children. Option A (Stack) is incorrect because stacks follow a Last-In-First-Out (LIFO) order, which is used in Depth-First Search (DFS), not BFS. Option B (Priority queue) is incorrect because BFS explores nodes level by level without prioritizing nodes based on any criteria. Option D (Linked list) is incorrect because a linked list does not naturally follow FIFO principles unless implemented as a queue. Option E (Binary heap) is incorrect because a binary heap is used in algorithms like Dijkstra’s shortest path, not BFS traversal.
What is the percentage increase in milk production over the last decade according to the revised Rashtriya Gokul Mission?
How many snow leopards were recorded in India’s first Snow Leopard Census?
Who is the author of the book “Nuclearization of Asia”?
In Leh, the first ever ice climbing festival was celebrated in ______ valley in January 2021.
How many total jobs (direct and indirect) are expected to be created by Google’s data centre project in Visakhapatnam?
Which three ports are designated as Green Hydrogen Hub Ports under India's maritime strategy?
India's leading bourse NSE has emerged as the world’s largest derivatives exchange group in 2023 by the number of contracts traded, according to the F...
According to estimates by ICRA regarding industrial production, what level of Index of Industrial Production (IIP) growth was expected for January?
Recently Reserve Bank of India (RBI) accepted the Centre’s request for allowing non-financial institutions and non-regulated entities to own more ...
As of October 1, 2025, what new type of loan facility did RBI allow banks to extend to manufacturers?