Skip to content

[Tree Serialization] Invert Binary Tree #115

@sudosf

Description

@sudosf

Problem

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

References

Difficulty

🟢 Easy

Companies

Amazon, Adobe, Sumo Logic

Notes

Language: Java
Swap left and right children at every node recursively. One line of logic after the recursive calls.

Metadata

Metadata

Assignees

No one assigned

    Labels

    dfsDepth-first searcheasyEasy difficultytreeTree problems

    Projects

    Status
    Backlog

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions