Count Complete Tree Nodes
Count Complete Tree Nodes题目Given a complete binary tree, count the number of nodes. Definition of a complete binary tree from Wikipedia:In a
Count Complete Tree Nodes题目Given a complete binary tree, count the number of nodes. Definition of a complete binary tree from Wikipedia:In a
Binary Tree Right Side View题目Given a binary tree, imagine yourself standing on the right side of it, return the values of the nodes you can
Binary Search Tree Iterator题目Implement an iterator over a binary search tree (BST). Your iterator will be initialized with the root node of
Binary Tree Postorder Traversal题目Given a binary tree, return the postorder traversal of its nodes’ values. For example: Given binary tree {1
Binary Tree Preorder Traversal题目Given a binary tree, return the preorder traversal of its nodes’ values. For example: Given binary tree {1,#
Sum Root to Leaf Numbers题目Given a binary tree containing digits from 0-9 only, each root-to-leaf path could represent a number. An example i
Populating Next Right Pointers in Each Node II题目Follow up for problem “Populating Next Right Pointers in Each Node”. What if the given tree
Populating Next Right Pointers in Each Node题目Given a binary tree struct TreeLinkNode { TreeLinkNode *left; TreeLinkNode *right; TreeLi
Flatten Binary Tree to Linked List题目Given a binary tree, flatten it to a linked list in-place. For example,Given 1 / \ 2 5 / \
Path Sum II题目Given a binary tree and a sum, find all root-to-leaf paths where each path’s sum equals the given sum. For example: Given the b