码迷,mamicode.com
首页 >  
搜索关键字:zigzag level order t    ( 24142个结果
apue和unp的学习之旅09——套接字选项
//-----------------------------------1.getsockopt和setsockopt-------------------------------------- #include int getsockopt(int sockfd, int level, int optname, void* optval, socklen_t* optlen); int...
分类:其他好文   时间:2014-07-22 23:03:55    阅读次数:329
leetcode__Add Two Numbers && Climbing Stairs
You are given two linked lists representing two non-negative numbers. The digits are stored in reverse order and each of their nodes contain a single digit. Add the two numbers and return it as a link...
分类:其他好文   时间:2014-05-01 22:08:19    阅读次数:366
Add Two Numbers
You are given two linked lists representing two non-negative numbers. The digits are stored in reverse order and each of their nodes contain a single ...
分类:其他好文   时间:2014-05-01 20:18:54    阅读次数:425
最大流之dinic
先用bfs预处理出层次图,然后在层次图上用dfs找增广路径,理论复杂度O(n*n*m)const int INF=0xfffffff ;struct node{ int s,t,cap,nxt ;}e[200005] ;int m,n,head[10005],level[10005],cnt ...
分类:其他好文   时间:2014-05-01 20:05:16    阅读次数:379
【CareerCup】Trees and Graphs—Q4.3
题目: Given a sorted (increasing order) array, write an algorithm to create a binary tree with minimal height. 翻译: 给定一个有序数组(递增),写程序构建一棵具有最小高度的二叉树。 思路: 要使二叉树的高度最小,则要尽量使其左右子树的节点数目相当,自然就考虑到将其构造成为二叉排序树,且将有序数组的中间大的数作为根节点,这样得到的二叉树的高度便是最小的。...
分类:其他好文   时间:2014-05-01 17:48:45    阅读次数:321
Subsets
Problem 1:Given a set of distinct integers, S, return all possible subsets.Note:Elements in a subset must be in non-descending order.The solution set ...
分类:其他好文   时间:2014-05-01 09:43:43    阅读次数:414
Oracle按时间段分组统计
想要按时间段分组查询,首先要了解level,connect by,oracle时间的加减.关于level这里不多说,我只写出一个查询语句:----level 是一个伪例 select level from dual connect by level d.dt-2 group by d.dt ...
分类:数据库   时间:2014-05-01 08:09:44    阅读次数:415
[ACM] POJ2352 [树状数组稍微变形]
DescriptionAstronomers often examine star maps where stars are represented by points on a plane and each star has Cartesian coordinates. Let the level...
分类:其他好文   时间:2014-05-01 05:42:32    阅读次数:368
Object layout in C++ and access control
The variables are guaranteed to be laid out contiguously, as in C. However, the access blocks may not appear in the object in the order that you decla...
分类:数据库   时间:2014-05-01 04:11:22    阅读次数:543
Timus 1510. Order 找到出现次数过半的数
又是一个新的算法,原来可以这样查找的。 我的一句话理解的思想: 计算可以抵消的数量,那么如果一个数出现的次数超过半那么最终这个数肯定不会被抵消完。 这个思想叫 Moore’s Voting Algorithm 有了这个思想武器之后,程序就可以写的很简单,可以很清楚看到怎么实现的, 参考资料可以看:...
分类:其他好文   时间:2014-04-29 13:22:22    阅读次数:260
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!