Breadth First Search (BFS) and Depth First Search (DFS) are searching algorithm for trees or graphs. Both algorithms have identical structure, it goes as below: 983 more words
Tags » BF's
Problem Type: BFS, Graph
Problem Summary: Find the shortest path from source to destination in 2D grid containing some bombs (invalid positions).
Algorithm: Given that the position moving to is valid, there are four possible robotic moves (UP, LEFT, RIGHT, DOWN) for each position on grid. 296 more words