In computer science, iterative deepening search or more specifically iterative deepening depth-first search (IDS or IDDFS) is a state space/graph search strategy in which a depth-limited version of depth-first search is run repeatedly with increasing depth limits until the goal is found. IDDFS is equivalent to breadth-first search, but uses much less memory; on each iteration, it visits the nodes in the search tree in the same order as depth-first search, but the cumulative order in which nodes are first visited is effectively breadth-first.The following pseudocode shows IDDFS implemented in terms of a recursive depth-limited DFS (called DLS).IDDFS combines depth-first search's space-efficiency and breadth-first search's completeness (when the branching factor is finite). It is optimal when the path cost is a non-decreasing function of the depth of the node.[citation needed]The time complexity of IDDFS is and its space complexity is, where is the branching factor and is the depth of the shallowest goal. https://en.wikipedia.org/wiki/Iterative_deepenin...