Skip to content

Latest commit

 

History

History
11 lines (8 loc) · 341 Bytes

File metadata and controls

11 lines (8 loc) · 341 Bytes

Problem 3: Mirror Transmutation

Problem Statement

Given the root of a binary tree, invert the tree, and return its root. Inverting a tree means swapping all left and right children for every node.

Input Format

  • The root of a binary tree.

Example

Input: root = [4, 2, 7, 1, 3, 6, 9]
Output: [4, 7, 2, 9, 6, 3, 1]