码迷,mamicode.com
首页 >  
搜索关键字:binary trees    ( 12390个结果)
[Leetcode] Binary search/tree-230. Kth Smallest Element in a BST
Given a binary search tree, write a function kthSmallest to find the kth smallest element in it. Note: You may assume k is always valid, 1 ? k ? BST's ...
分类:其他好文   时间:2017-06-12 00:42:23    阅读次数:175
Balanced Binary Tree Leetcode
Given a binary tree, determine if it is height-balanced. For this problem, a height-balanced binary tree is defined as a binary tree in which the dept ...
分类:其他好文   时间:2017-06-12 00:40:11    阅读次数:128
(leetcode题解)Max Consecutive Ones
Given a binary array, find the maximum number of consecutive 1s in this array. Example 1: Note: The input array will only contain 0 and 1. The length ...
分类:其他好文   时间:2017-06-11 21:16:17    阅读次数:178
[Leetcode] Populating next right pointer in each node ii 填充每个节点的右指针
Follow up for problem "Populating Next Right Pointers in Each Node". What if the given tree could be any binary tree? Would your previous solution sti ...
分类:其他好文   时间:2017-06-11 16:24:27    阅读次数:222
[leetcode-617-Merge Two Binary Trees]
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 ...
分类:其他好文   时间:2017-06-11 12:05:03    阅读次数:94
优雅地乱玩Linux-3-Ubuntu下NodeJS的安装
文章最初发表于szhshp的第三边境研究所转载请注明 Ubuntu 16.04 安装NodeJS 天哪Linux安装NodeJS居然也这么麻烦 NodeJS安装 可能会出现找不到 curl的错误, apt-get一下curl就可以了 NPM安装 node VS nodeJS? NPM, Node安装 ...
分类:Web程序   时间:2017-06-11 00:55:25    阅读次数:700
437. 二叉树路径的和 Path Sum III
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 to ... ...
分类:其他好文   时间:2017-06-10 23:36:02    阅读次数:248
专题总结—二分查找与旋转排序数组
1、二分搜索的模板。 算法面试中,如果需要优化O(n)的时间复杂度,那么只能是O(logn)的二分法。 注意二分法大多数情况都是适用于排序数组。 http://www.lintcode.com/zh-cn/problem/first-position-of-target/ 模板有四点注意: 1)st ...
分类:编程语言   时间:2017-06-10 23:32:16    阅读次数:275
[Leetcode] Path Sum II路径和
Given a binary tree and a sum, find all root-to-leaf paths where each path's sum equals the given sum. For example:Given the below binary tree andsum ...
分类:其他好文   时间:2017-06-10 23:28:00    阅读次数:272
[Leetcode] Path Sum路径和
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 ...
分类:其他好文   时间:2017-06-10 22:30:32    阅读次数:152
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!