Search⌘ K
AI Features

Challenge: Free Tree

Explore how to free all nodes of a binary tree by implementing a freeTree function in Go. This lesson helps you understand memory management within trees and practice coding the solution step-by-step.

Problem

Given a binary tree, free all its nodes.

Input

A binary tree.

Output

An empty tree. ...