https://leetcode.com/problems/validate-binary-search-tree/description/Given a binary tree, determine if it is a valid binary search tree (BST).Assume ... ...
分类:
其他好文 时间:
2018-03-02 12:19:44
阅读次数:
140
string Quote string with slashes in a C style 以 C 语言风格使用反斜线转义字符串中的字符 Quote string with slashes 使用反斜线引用字符串 Convert binary data into hexadecimal represe ...
分类:
Web程序 时间:
2018-03-01 21:44:48
阅读次数:
269
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. ...
分类:
其他好文 时间:
2018-03-01 21:38:30
阅读次数:
181
Given an undirected weighted graph G, you should find one of spanning trees specified as follows. The graph G is an ordered pair (V, E), where V is a ...
分类:
其他好文 时间:
2018-03-01 17:35:56
阅读次数:
149
Question: Given a singly linked list where elements are sorted in ascending order, convert it to a height balanced BST. For this problem, a height-bal ...
分类:
其他好文 时间:
2018-03-01 14:53:58
阅读次数:
133
https://leetcode.com/problems/binary-tree-longest-consecutive-sequence/description/Given a binary tree, find the length of the longest consecutive seq... ...
分类:
其他好文 时间:
2018-03-01 11:38:14
阅读次数:
142
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 ...
分类:
其他好文 时间:
2018-02-28 10:40:21
阅读次数:
136
网上还有一种做法用STACK 现在无法理解,以后再弄! ...
分类:
其他好文 时间:
2018-02-28 10:38:22
阅读次数:
165
1 /** 2 * Definition for a binary tree node. 3 * public class TreeNode { 4 * int val; 5 * TreeNode left; 6 * TreeNode right; 7 * TreeNode(int x) { val... ...
分类:
其他好文 时间:
2018-02-28 10:35:58
阅读次数:
127
Given two binary strings, return their sum (also a binary string). For example,a = "11"b = "1"Return "100". 思路: 从最低位加到最高位,当前位相加结果是%2,进位是/2,记得处理每一次的进位和 ...
分类:
其他好文 时间:
2018-02-28 10:32:03
阅读次数:
166