摘要:
Given a binary tree, you need to compute the length of the diameter of the tree. The diameter of a binary tree is the length of the longestpath betwee 阅读全文
摘要:
You are given a binary tree in which each node contains an integer value. Find the number of paths that sum to a given value. The path does not need t 阅读全文
摘要:
Given two binary trees, write a function to check if they are the same or not. Two binary trees are considered the same if they are structurally ident 阅读全文
摘要:
You're now a baseball game point recorder. Given a list of strings, each string can be one of the 4 following types: Each round's operation is permane 阅读全文
摘要:
Given a non-empty binary tree, return the average value of the nodes on each level in the form of an array. Example 1: Note: 以数组的形式返回每个层次上的节点的平均值 C++( 阅读全文
摘要:
You are given a data structure of employee information, which includes the employee's unique id, his importance value and his directsubordinates' id. 阅读全文
摘要:
Given a Binary Search Tree and a target number, return true if there exist two elements in the BST such that their sum is equal to the given target. E 阅读全文
摘要:
Given an array of characters, compress it in-place. The length after compression must always be smaller than or equal to the original array. Every ele 阅读全文