In Depth First Search (DFS), traverse the node until the leaf is reached, so if there are n nodes, the running time will be (image unavailable).

In Iterative Deepening Search (IDS), during the first iteration, the child of the root is visited first and then in the second iteration, the child of the root is visited which is at the depth 2, now at the third iteration, the child of the root is visited which is at depth 3.

The time complexity of iterative deepening is as follows:

(image unavailable)

Thus, the iterative deepening will perform worst if there is one goal or solution at the depth n and the branching factor is 1.