DFS using stack without recursion