---
title: "Discussion on \"LeetCode 226: Invert Binary Tree — Step-by-Step Visual Trace\" | Hashnode"
description: "Discussion on \"LeetCode 226: Invert Binary Tree — Step-by-Step Visual Trace\". Given the root of a binary tree, invert the tree by swapping the left and right children of every node, and return the root of the inverted tree."
url: "https://hashnode.com/posts/invert-binary-tree-visualization/69d7d2281cf15606b260092e"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [LeetCode 226: Invert Binary Tree — Step-by-Step Visual Trace](https://blog.tracelit.dev/invert-binary-tree-visualization?utm_source=hashnode&utm_medium=feed)

Given the root of a binary tree, invert the tree by swapping the left and right children of every node, and return the root of the inverted tree.

Apr 9 · 1 min read · blog.tracelit.dev  
Read the article

-   [#algorithms](https://hashnode.com/tag/algorithms)
-   [#binary-tree](https://hashnode.com/tag/binary-tree)
-   [#leetcode](https://hashnode.com/tag/leetcode)

## Written by

[tracelit](https://hashnode.com/@tracelit)

@tracelit

  
[View profile](https://hashnode.com/@tracelit)

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
