码迷,mamicode.com
首页 >  
搜索关键字:binary trees    ( 12390个结果)
[LeetCode] Path Sum
1 /** 2 * Definition for binary tree 3 * public class TreeNode { 4 * int val; 5 * TreeNode left; 6 * TreeNode right; 7 * TreeNo...
分类:其他好文   时间:2014-09-10 01:35:19    阅读次数:221
node.js模块之Buffer模块
http://nodejs.org/api/buffer.htmlPure JavaScript is Unicode friendly but not nice to binary data. When dealing with TCP streams or the file system, it...
分类:Web程序   时间:2014-09-09 23:02:59    阅读次数:491
php 精准计算模块bcmath
bc是Binary Calculator的缩写。bc*函数的参数都是操作数加上一个可选的 [int scale],比如string bcadd(string $left_operand, string $right_operand[, int $scale]),如果scale没有提供,就用bcscale的缺省值。这里大数直接用一个由0-9组成的string表示,计算结果返回的也是一个 string...
分类:Web程序   时间:2014-09-09 21:37:39    阅读次数:499
Sum Root to Leaf Numbers <leetcode>
Given a binary tree containing digits from0-9only, each root-to-leaf path could represent a number.An example is the root-to-leaf path1->2->3which rep...
分类:其他好文   时间:2014-09-09 21:27:19    阅读次数:194
Populating Next Right Pointers in Each Node II <leetcode>
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 stil...
分类:其他好文   时间:2014-09-09 19:57:29    阅读次数:237
Python学习笔记(二)Pytho解释器和程序开发、执行过程
Python程序编写支持交互式和执行文件两种,python程序执行过程是现将代码转变成字节码,再发送给虚拟机解释执行。Python开发中,还包含一些优化基本执行模块的优化系统,试图提高Python的运行速度等,如Psyco实时编译器和Shedskin C++转换器。另外,如果需要将Python程序生成可独立执行的二进制代码则需要第三方工具“冻结二进制文件”(Frozen Binary)。...
分类:编程语言   时间:2014-09-09 18:22:29    阅读次数:233
HDU 1390 Binary Numbers(数学题)
HDU 1390 Binary Numbers(数学题)...
分类:其他好文   时间:2014-09-09 16:08:09    阅读次数:187
leetcode - Add Binary
Given two binary strings, return their sum (also a binary string).For example,a ="11"b ="1"Return"100".字符串相加,不难个人思路:1,尾部对齐,然后逐位相加,flag记为进位代码: 1 #inclu...
分类:其他好文   时间:2014-09-09 15:26:58    阅读次数:213
Path Sum <leetcode>
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.Fo...
分类:其他好文   时间:2014-09-09 15:11:38    阅读次数:140
【leetcode】Convert Sorted List to Binary Search Tree-递
我觉着写得比看到的答案更清晰~ class Solution { public: TreeNode *ltob(ListNode *head, ListNode *end) { if(head == end) { TreeNode * node = new TreeNode(head->val); return node;...
分类:其他好文   时间:2014-09-09 12:56:58    阅读次数:166
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!