Invert Binary Tree

Description

In this lesson, your task is to invert a given a binary tree, T.

Let’s look at an example below:

main.cpp
TreeNode.h
#include "TreeNode.h"
TreeNode* invertTree(TreeNode* root) {
return root;
}
Invert binary tree
...

Create a free account to view this lesson.

By signing up, you agree to Educative's Terms of Service and Privacy Policy