码迷,mamicode.com
首页 >  
搜索关键字:binary trees    ( 12390个结果)
LC.98.Validate Binary Search Tree
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
PHP之string
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
【easy】671. Second Minimum Node In a Binary Tree
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
【Leetcode】109. Convert Sorted List to Binary Search Tree
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
LC.298.Binary Tree Longest Consecutive Sequence
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
2.27 PathSum (leetcode 112) preorder 解法
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
LC.112.Path Sum
网上还有一种做法用STACK 现在无法理解,以后再弄! ...
分类:其他好文   时间:2018-02-28 10:38:22    阅读次数:165
2.27 Invert Binary Tree(Leetcode 226) post-order解法
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
[LeetCode] 67. Add Binary 二进制数相加
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
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!