Closed iMohitPant closed 3 years ago
Added Depth First Search Algorithm code written in CPP. Time complexity: O(V + E), where V is the number of vertices and E is the number of edges in the graph. Space Complexity: O(V). Since an extra visited array is needed of size V.
Please add a reference to the issue you created. Your code seems okay. :)
reference to issue #9
Added Depth First Search Algorithm code written in CPP. Time complexity: O(V + E), where V is the number of vertices and E is the number of edges in the graph. Space Complexity: O(V). Since an extra visited array is needed of size V.