上一页 1 ··· 29 30 31 32 33 34 35 36 37 ··· 49 下一页
摘要: Given a non-empty special binary tree consisting of nodes with the non-negative value, where each node in this tree has exactly two or zero sub-node. 阅读全文
posted @ 2017-10-22 10:13 daniel456 阅读(148) 评论(0) 推荐(0)
摘要: Given two binary trees and imagine that when you put one of them to cover the other, some nodes of the two trees are overlapped while the others are n 阅读全文
posted @ 2017-10-22 10:10 daniel456 阅读(94) 评论(0) 推荐(0)
摘要: Remove all elements from a linked list of integers that have value val. ExampleGiven: 1 --> 2 --> 6 --> 3 --> 4 --> 5 --> 6, val = 6Return: 1 --> 2 -- 阅读全文
posted @ 2017-10-21 23:36 daniel456 阅读(81) 评论(0) 推荐(0)
摘要: Find the sum of all left leaves in a given binary tree. Example: 方法二: 阅读全文
posted @ 2017-10-21 23:09 daniel456 阅读(123) 评论(0) 推荐(0)
摘要: Given a binary search tree (BST) with duplicates, find all the mode(s) (the most frequently occurred element) in the given BST. Assume a BST is define 阅读全文
posted @ 2017-10-21 22:54 daniel456 阅读(136) 评论(0) 推荐(0)
摘要: Given 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 sum of all 阅读全文
posted @ 2017-10-21 22:50 daniel456 阅读(96) 评论(0) 推荐(0)
摘要: 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 阅读全文
posted @ 2017-10-21 22:37 daniel456 阅读(90) 评论(0) 推荐(0)
摘要: Given a binary search tree (BST), find the lowest common ancestor (LCA) of two given nodes in the BST. According to the definition of LCA on Wikipedia 阅读全文
posted @ 2017-10-21 22:33 daniel456 阅读(91) 评论(0) 推荐(0)
摘要: Given a binary tree and a sum, determine if the tree has a root-to-leaf path such that adding up all the values along the path equals the given sum. F 阅读全文
posted @ 2017-10-21 22:29 daniel456 阅读(122) 评论(0) 推荐(0)
摘要: Given a binary tree, find its minimum depth. The minimum depth is the number of nodes along the shortest path from the root node down to the nearest l 阅读全文
posted @ 2017-10-21 22:26 daniel456 阅读(138) 评论(0) 推荐(0)
上一页 1 ··· 29 30 31 32 33 34 35 36 37 ··· 49 下一页