Select Page
Water Jug Problem using DFS

Water Jug Problem using DFS

DFS Algorithm: Depth first search is another way of traversing graphs, which is closely related to preorder traversal of a tree. Recall that preorder traversal simply visits each node before its children. It is most easy to program as a recursive routine:...