Bug Fix in DFS algorithm

Correcting a bug in DFS. Nodes which is added to stack shouldn't have been popped unless all it's child nodes are processed. 
It should be popped once all nodes are processed and displayed.