码迷,mamicode.com
首页 >  
搜索关键字:binary trees    ( 12390个结果)
定时往oracle插入数据
1创建存储过程create or replace procedure job_proc isbegininsert into yy (yid) values (sysdate);end;2创建jobDECLARE JOB BINARY_INTEGER; --任务ID v_be...
分类:数据库   时间:2014-08-26 11:16:35    阅读次数:242
计算机的存储单位
计算机的存储单位位 bit (比特)(Binary Digits):存放一位二进制数,即 0 或 1,最小的存储单位。字节 byte:8个二进制位为一个字节(B),最常用的单位。即1B(byte 字节) = 8 bit计算机存储单位一般用B,KB,MB,GB,TB,PB,EB,ZB,YB,BB来表示...
分类:其他好文   时间:2014-08-25 22:46:24    阅读次数:270
LeetCode: Binary Tree Maximum Path Sum
LeetCode: Binary Tree Maximum Path SumGiven a binary tree, find the maximum path sum.The path may start and end at any node in the tree. For example:G...
分类:其他好文   时间:2014-08-25 22:34:54    阅读次数:184
HDU3240-Counting Binary Trees(Catalan数+求逆元(非互质))
Counting Binary Trees Time Limit: 6000/3000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 564    Accepted Submission(s): 184 Problem Description There ...
分类:其他好文   时间:2014-08-25 17:07:44    阅读次数:266
Add Binary
Given two binary strings, return their sum (also a binary string).For example,a = "11"b = "1"Return "100".思路: 1 class Solution { 2 public: 3 strin...
分类:其他好文   时间:2014-08-25 16:58:34    阅读次数:188
HDU 3240 Counting Binary Trees(组合数学-斯特林数,数论-整数快速幂,数论-求逆元)
HDU 3240 Counting Binary Trees(组合数学-斯特林数,数论-整数快速幂,数论-求逆元) 题目大意: 问你不超过n个节点的二叉树的方案数,结果要对m求余。 解题思路: 方案数可以划分左右两边划分子问题也就是 h(n)=h(0)*h(n-1)+h(1)*(h-2)+..................+h(n-1)*h(0),一看就是卡特兰数, 关于卡特兰数必须要nlg^n的左右效率的算法解决 百度一下,知道: 令h(0)=1,h(1)=1, catalan数满足: 递推式[1]...
分类:其他好文   时间:2014-08-25 14:59:24    阅读次数:223
UVA 1264 - Binary Search Tree(BST+计数)
UVA 1264 - Binary Search Tree 题目链接 题意:给定一个序列,插入二叉排序树,问有多少中序列插入后和这个树是相同的(包括原序列) 思路:先建树,然后dfs一遍,对于一个子树而言,只要保证左边和右边顺序对就可以了,所以种数为C(左右结点总数,左结点),然后根据乘法原理乘上左右子树的情况即可 代码: #include #include t...
分类:其他好文   时间:2014-08-25 11:51:14    阅读次数:204
求二叉树中和为给定值的所有路径
转自:http://blog.csdn.net/lalor/article/details/7614381问题定义: You are given a binary tree in which each node contains a value. Design an algorithm to ...
分类:其他好文   时间:2014-08-25 11:20:04    阅读次数:292
projecteuler---->problem=36----Double-base palindromes
Problem 36 The decimal number, 585 = 10010010012 (binary), is palindromic in both bases. Find the sum of all numbers, less than one million, which are palindromic in base 10 and base 2. (Please...
分类:其他好文   时间:2014-08-25 10:06:04    阅读次数:198
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!