Added DFS solution