Trees • Easy
Invert Binary Tree
Given the `root` of a binary tree, invert the tree, and return its root.
The Challenge
Given the `root` of a binary tree, invert the tree, and return its root.
Pro-tip: Use recursion. Swap the left and right children for each node.
Solution.swift Tests.swift
Output
Ready to run.