Depth-First Search
how to traverse trees with preorder, inorder, and postorder, when to pick each one, and how to convert between recursive and iterative implementations
Sign in with your Google or GitHub account to get started
how to traverse trees with preorder, inorder, and postorder, when to pick each one, and how to convert between recursive and iterative implementations
██████╗ ██████╗ ██████╗ ██╗███████╗ ██████╗████████╗██╗ ██╗ ██████╗ ██╗ ██╗████████╗██╗ ██╗ ██████╗ ██╗ ██╗███████╗███████╗ ██╔══██╗██╔══██╗██╔═══██╗ ██║██╔════╝██╔════╝╚══██╔══╝██║ ██║██╔════╝ ██║ ██║╚══██╔══╝██║ ██║██╔═══██╗██║ ██║██╔════╝██╔════╝ ██████╔╝██████╔╝██║ ██║ ██║█████╗ ██║ ██║ ██║ ██║██║ ███╗███████║ ██║ ███████║██║ ██║██║ ██║███████╗█████╗ ██╔═══╝ ██╔══██╗██║ ██║██ ██║██╔══╝ ██║ ██║ ██║ ██║██║ ██║██╔══██║ ██║ ██╔══██║██║ ██║██║ ██║╚════██║██╔══╝ ██║ ██║ ██║╚██████╔╝╚█████╔╝███████╗╚██████╗ ██║ ███████╗██║╚██████╔╝██║ ██║ ██║ ██║ ██║╚██████╔╝╚██████╔╝███████║███████╗ ╚═╝ ╚═╝ ╚═╝ ╚═════╝ ╚════╝ ╚══════╝ ╚═════╝ ╚═╝ ╚══════╝╚═╝ ╚═════╝ ╚═╝ ╚═╝ ╚═╝ ╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚══════╝╚══════╝