上一页 1 ··· 28 29 30 31 32 33 34 35 36 ··· 48 下一页
摘要: Given a binary tree, check whether it is a mirror of itself (ie, symmetric around its center). For example, this binary tree [1,2,2,3,4,4,3] is symmet 阅读全文
posted @ 2017-10-22 17:20 daniel456 阅读(101) 评论(0) 推荐(0) 编辑
摘要: Given a binary search tree and the lowest and highest boundaries as L and R, trim the tree so that all its elements lies in [L, R] (R >= L). You might 阅读全文
posted @ 2017-10-22 17:18 daniel456 阅读(114) 评论(0) 推荐(0) 编辑
摘要: 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 阅读全文
posted @ 2017-10-22 17:08 daniel456 阅读(118) 评论(0) 推荐(0) 编辑
摘要: Given a non-empty binary tree, return the average value of the nodes on each level in the form of an array. Example 1: 阅读全文
posted @ 2017-10-22 17:05 daniel456 阅读(105) 评论(0) 推荐(0) 编辑
摘要: Given a binary tree, return the tilt of the whole tree. The tilt of a tree node is defined as the absolute difference between the sum of all left subt 阅读全文
posted @ 2017-10-22 17:03 daniel456 阅读(99) 评论(0) 推荐(0) 编辑
摘要: Given two non-empty binary trees s and t, check whether tree t has exactly the same structure and node values with a subtree of s. A subtree of s is a 阅读全文
posted @ 2017-10-22 16:56 daniel456 阅读(119) 评论(0) 推荐(0) 编辑
摘要: nvert a binary tree. to 方法二:BfS 阅读全文
posted @ 2017-10-22 16:52 daniel456 阅读(128) 评论(0) 推荐(0) 编辑
摘要: 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 阅读(139) 评论(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 阅读(84) 评论(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 阅读(73) 评论(0) 推荐(0) 编辑
上一页 1 ··· 28 29 30 31 32 33 34 35 36 ··· 48 下一页