#144

Binary Tree Preorder Traversal

easy · 75.3% accepted · 8,842 likes · top 86%

stack · tree · depth-first search · binary tree

⊣ practice⊣ quiz⊣ open on leetcode ↗

Description

Given the root of a binary tree, return the preorder traversal of its nodes' values.

Solution