码迷,mamicode.com
首页 >  
搜索关键字:binary trees    ( 12390个结果)
8.2 leetcode 102,107. binary tree level order traversal I & II:(up-down & bottom-up)
1 public class Solution { 2 public List> levelOrder(TreeNode root) { 3 List> res = new ArrayList>(); 4 if(root == null) return ...
分类:其他好文   时间:2015-08-04 07:04:20    阅读次数:131
【LeetCode】190 - Triangle
Reverse bits of a given 32 bits unsigned integer.For example, given input 43261596 (represented in binary as00000010100101000001111010011100), return ...
分类:其他好文   时间:2015-08-04 02:01:23    阅读次数:93
[CareerCup] 4.5 Validate Binary Search Tree 验证二叉搜索树
4.5 Implement a function to check if a binary tree is a binary search tree.LeetCode上的原理,请参见我之前的博客Validate Binary Search Tree 验证二叉搜索树。
分类:其他好文   时间:2015-08-04 00:37:06    阅读次数:97
[leedcode 199] Binary Tree Right Side View
Given a binary tree, imagine yourself standing on therightside of it, return the values of the nodes you can see ordered from top to bottom.For exampl...
分类:其他好文   时间:2015-08-03 22:18:49    阅读次数:105
[leedcode 190] Reverse Bits
Reverse bits of a given 32 bits unsigned integer.For example, given input 43261596 (represented in binary as00000010100101000001111010011100), return ...
分类:其他好文   时间:2015-08-03 22:14:10    阅读次数:172
IOS使用纯C语言创建静态库
1.首先是准备好要编译的.h文件和.c文件。 2.在Xcode中建立library的工程。 3.将.h和.c文件拷贝进入项目中,并删除项目的原本代码。 4.编译项目,在product目录下会得到.a文件。 5.使用:新建一个项目,添加刚才.h文件。 然后在这个工程的Build Phases的Link Binary With Library里面添加我们刚才拷贝出来的那个.a文件。...
分类:移动开发   时间:2015-08-03 21:06:03    阅读次数:169
lintcode Binary Search
For a given sorted array (ascending order) and a target number, find the first index of this number in O(log n) time complexity. If the target number does not exist in the array, return -1. ...
分类:其他好文   时间:2015-08-03 19:08:48    阅读次数:151
leetcode-67-Add Binary
Add Binary Given two binary strings, return their sum (also a binary string). For example, a = "11" b = "1" Return "100". 两字符串表示的2进制数。求它们的和。 直接模拟,从最后一位开始每一位都相加,结果保存在栈中。 class Solut...
分类:其他好文   时间:2015-08-03 19:07:54    阅读次数:115
Leetcode-199(Java) Binary Tree Right Side View
Given a binary tree, imagine yourself standing on therightside of it, return the values of the nodes you can see ordered from top to bottom.For exampl...
分类:编程语言   时间:2015-08-03 18:48:01    阅读次数:105
windows下使用Eclipse编译运行MapReduce程序 Hadoop2.6.0/Ubuntu(二)
在上篇文章中eclipse已经能访问HDFS目录,但并不能进行Mapreduce编程,在这里小编将常见错误和处理办法进行总结,希望对大家有所帮助 错误1:ERROR [main] util.Shell (Shell.java:getWinUtilsPath(303)) - Failed to locate the winutils binary in the hadoop binary path...
分类:Windows程序   时间:2015-08-03 17:02:44    阅读次数:395
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!