Problem of the Day
A new programming or logic puzzle every Mon-Fri

Invert Binary Tree

A classic, but challenging programming problem for us to solve today. The goal is to create a function or method that takes in a binary tree and inverts it. It is safe to assume the tree has at least one node. For example:

           1
           / \ 
          2 3 
              \
              4 

               4 
              /
           2 3
            \ /
             1

Permalink: http://problemotd.com/problem/invert-binary-tree/

Comments:

  • There are currently no comments. You can be first!

Content curated by @MaxBurstein