bugl
bugl
HomeLearnPatternsPathsSearchPremium
HomeLearnPatternsPaths
EasyTreesLC 144

Binary Tree Preorder Traversal

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

Asked at 5 companies
AmazonBloombergCisco
Hints
  • 1.Think about which data structure fits best
  • 2.Consider the time complexity of your approach
  • 3.Look for patterns in the constraints
LeetCode