bugl
bugl
HomeLearnPatternsPathsSearchPremium
HomeLearnPatternsPaths
EasyTreesLC 226

Invert Binary Tree

Given the root of a binary tree, invert the tree, and return its root.

Asked at 9 companies
AmazonAppleBloomberg
Hints
  • 1.Think about what data structure fits Invert Binary Tree
  • 2.Consider the brute force complexity and how to optimize
  • 3.Can you trade space for time?
LeetCodeNeetCode