Can someone please clear the use of stack in depth-first first search?
Q. How to keep a track of the visited vertices that have already been popped? Do i put it in an array or what?
Also, please tell me about the time complexity, space complexity and the use of array and link list in depth-first search