Stack Based DFS

Core Skill

Problems

Pattern

stack = []
while stack or node: