Skip to main content

50 docs tagged with "Binary Tree"

View all tags

Binary Search

This is a solution to the Binary Search problem on LeetCode.

Binary Tree Level Order Traversal II

Given the root of a binary tree, return the bottom-up level order traversal of its nodes' values. (i.e., from left to right, level by level from leaf to root).

Construct String from Binary Tree

Given the root of a binary tree, construct a string consisting of parenthesis and integers from a binary tree with the preorder traversal way.

Convert BST to Greater Tree

Given the root of a Binary Search Tree (BST), convert it to a Greater Tree such that every key of the original BST is changed to the original key plus the sum of all keys greater than the original key in BST.

Delete Nodes And Return Forest

Solve the problem of deleting nodes from a binary tree and returning the forest of remaining trees using depth-first search.

Height of Binary Tree Problem (gfg)

This tutorial covers the solution to the Height of Binary Tree problem from the GeeksforGeeks website, featuring implementations in Python and C++.

Most Frequent Subtree Sum

Given the root of a binary tree, return the most frequent subtree sum. If there is a tie, return all the values with the highest frequency in any order.

My Calendar I

This is a solution to the My Calendar I problem on LeetCode.

Path Sum III

This is a solution to the Path Sum III problem on LeetCode.

Size of Binary Tree

This document covers methods to calculate the size (number of nodes) of a binary tree in various programming languages.

Subtree of Another Tree(LeetCode)

Given the roots of two binary trees root and subRoot, return true if there is a subtree of root with the same structure and node values of subRoot and false otherwise.