hifcgbe these are the nodes which are reachable from the node features of depth-first search algorithm space complexity the space complexity of depth-first search is lower than that of breadthfirst search time complexity the time complexity of depth-first search is proportional to the number of vertices plus the number of edges in the graphs that are traversed the time complexity can be given as ( (| | |)completeness depth-first search is said to be complete algorithm if there is solutiondepthfirst search will find it regardless of the kind of graph but in case of an infinite graphwhere there is no possible solutionit will diverge applications of depth-first search algorithm depth-first search is useful forfinding path between two specified nodesu and vof an unweighted graph finding path between two specified nodesu and vof weighted graph finding whether graph is connected or not computing the spanning tree of connected graph programming example write program to implement the depth-first search algorithm #include #define max void depth_first_search(int adj[][max],int visited[],int startint stack[max]int top - iprintf("% -",start )visited[start stack[++topstartwhile(top - start stack[top]for( maxi++if(adj[start][ &visited[ = stack[++topiprintf("% -" )visited[ breakif( =maxtop--int main(int adj[max][max]int visited[max{ }ij