
Check Completeness of a Binary Tree - LeetCode
Given the root of a binary tree, determine if it is a complete binary tree. In a complete binary tree, every level, except possibly the last, is completely filled, and all nodes in the last level are as …
Complete Binary Tree Inserter - LeetCode
Complete Binary Tree Inserter - A complete binary tree is a binary tree in which every level, except possibly the last, is completely filled, and all nodes are as far left as possible. Design …
Count Complete Tree Nodes - LeetCode
Given the root of a complete binary tree, return the number of the nodes in the tree. According to Wikipedia , every level, except possibly the last, is completely filled in a complete binary tree, …
Maximum Depth of Binary Tree - LeetCode
Maximum Depth of Binary Tree - Given the root of a binary tree, return its maximum depth. A binary tree's maximum depth is the number of nodes along the longest path from the root node …
All Possible Full Binary Trees - LeetCode
All Possible Full Binary Trees - Given an integer n, return a list of all possible full binary trees with n nodes. Each node of each tree in the answer must have Node.val == 0. Each element of the …
Binary Tree - LeetCode
Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview.
Binary Tree Level Order Traversal - LeetCode
Binary Tree Level Order Traversal - Given the root of a binary tree, return the level order traversal of its nodes' values. (i.e., from left to right, level by level).
Complete Binary Tree Inserter - LeetCode
Complete Binary Tree Inserter - A complete binary tree is a binary tree in which every level, except possibly the last, is completely filled, and all nodes are as far left as possible. Design …
Invert Binary Tree - LeetCode
Given the root of a binary tree, invert the tree, and return its root. Example 1: Input: root = [4,2,7,1,3,6,9] Output: [4,7,2,9,6,3,1] Example 2: Input: root = [2,1,3] Output: [2,3,1] Example …
Check Completeness of a Binary Tree - LeetCode
Check Completeness of a Binary Tree - Given the root of a binary tree, determine if it is a complete binary tree. In a complete binary tree …