Provide Best Programming Tutorials

## 113. Path Sum II

Question Given a binary tree and a sum, find all root-to-leaf paths where each path's sum equals the given sum. Note: A leaf is a node with no children. Example:…

## 257. Binary Tree Paths

Question Given a binary tree, return all root-to-leaf paths. Note: A leaf is a node with no children. Example: Input: 1 / \ 2 3 \ 5 Output: ["1->2->5", "1->3"] Explanation:…

## 114. Flatten Binary Tree to Linked List

Question Given a binary tree, flatten it to a linked list in-place. For example, given the following tree: 1 / \ 2 5 / \ \ 3 4 6 The…

## 429. N-ary Tree Level Order Traversal

Question Given an n-ary tree, return the level order traversal of its nodes' values. (ie, from left to right, level by level). For example, given a 3-ary tree:     We should…

## 106. Construct Binary Tree from Inorder and Postorder Traversal

Questioin Given inorder and postorder traversal of a tree, construct the binary tree. Note: You may assume that duplicates do not exist in the tree. For example, given inorder = [9,3,15,20,7]…

## Leetcode 199. Binary Tree Right Side View

Question Given a binary tree, imagine yourself standing on the right side of it, return the values of the nodes you can see ordered from top to bottom. Example: Input:  [1,2,3,null,5,null,4] Output:…

## Leetcode 104. Maximum Depth of Binary Tree

Question Given a binary tree, find its maximum depth. The maximum depth is the number of nodes along the longest path from the root node down to the farthest leaf…