Below you will find pages that utilize the taxonomy term “Algorithms”
April 17, 2023
Solving Perfect Squares problem using breadth-first search
I was learning recently about solving problems that use breadth-first search (BFS). This is a family of computer science algorithms that traverse tree data structures “by levels”. That is, starting at the root, we process all nodes on level 1, then all nodes on level 2, etc.
One typical application of BFS is to find the shortest path between the root and the given nodes.
To implement BFS, one should use the queue data structure.