Walmart Interview Question

BFS and DFS Greedy algorithm