码迷,mamicode.com
首页 >  
搜索关键字:binary index tree    ( 56466个结果
使用keepalived实现haproxy的高可用
二、配置haproxy实现网站的负载均衡:1、node1和node2都安装httpd,php,php-mysql:[root@node1~]#yum-yinstallhttpdphpphp-mysql[root@node2~]#yum-yinstallhttpdphpphp-mysql2、为node1和node2提供静态和动态网页:[root@node1~]#ls/var/www/html/ index.htmlindex.php [roo..
分类:其他好文   时间:2014-05-05 12:30:42    阅读次数:614
【LeetCode】Jump Game
Given an array of non-negative integers, you are initially positioned at the first index of the array.Each element in the array represents your maximu...
分类:其他好文   时间:2014-05-05 10:05:58    阅读次数:300
LeetCode OJ - Balanced Binary Tree
判断树是否是平衡的,这道题中的平衡的概念是指任意节点的两个子树的高度相差不超过1,我用递归的方法把所有的节点的高度都计算了下,并且在计算的过程记录每个节点左右两颗子树的高度差,最后通过遍历这个高度差就可以知道是否是平衡的。下面是AC代码: 1 /** 2 * Given a binary...
分类:其他好文   时间:2014-05-05 09:54:44    阅读次数:378
wdcp后台创建网站后,总是显示403界面
后台创建站点后后,域名已解析,但无法打开默认页面,创建网站后会有一个默认的index.html 存在于public_html下面的,我用FTP 查看是有的,但用域名却无法访问,总是显示403界面经查看,发现端口管理下面的 80端口显示的是nginx.conf ,然后我将系统设置里面的web引擎修改为...
分类:Web程序   时间:2014-05-05 09:53:22    阅读次数:409
LeetCode OJ - Symmetric Tree && Same Tree
这两道题,大同小异。 我都是用BFS,在遍历的过程,判断结构是否相同/对称,值是否相同。下面是AC代码: 1 /** 2 * Given a binary tree, check whether it is a mirror of itself (ie, symmetric aroun...
分类:其他好文   时间:2014-05-05 09:48:26    阅读次数:401
LeetCode OJ - Binary Tree Level Order Traversal 1 && 2
BFS以及它的扩展,我发现栈是个很好用的数据结构,特别是对于顺序需要颠倒的时候!!!这里有个重要的信息:可以用null来标识一个level的结束!!!下面是AC代码: 1 /** 2 * Given a binary tree, return the bottom-up level ord...
分类:其他好文   时间:2014-05-05 09:46:06    阅读次数:402
浪度九州城首页到内容页
浪度九州城---首页到产品内容页面的制作过程1、首页制作包含top,foot,以及内容展示的各项列表(list)首先top部分:打开vs2010之后,找到我们需要制作的index.html页面,然后Ctrl+K+D 调整页面代码格式。然后找到上面的class=“top”这个 ,再点击左边 -收缩到 ...
分类:其他好文   时间:2014-05-05 09:38:46    阅读次数:415
LeetCode OJ - Convert Sorted Array/List to Binary Search Tree
Array和List的区别在于前者可以随机访问,而后者只能顺序访问。对于把排好序的array转成BST,可以用top-down的方式,很直观也很自然,时间复杂度是O(n)。而对于List如果采用同样的方式,每次需要顺序遍历到中间节点,时间复杂度变成O(nlogn),如果换一种思路,down-top,...
分类:其他好文   时间:2014-05-05 09:34:29    阅读次数:454
travel the binary tree by level 4 ( from down to top and from left to right every level )
travel the binary tree by level 4 ( from down to top and from left to right every level ) 个人信息:就读于燕大本科软件工程专业 目前大三; 本人博客:google搜索“cqs_2012”即可; 个人爱好:酷爱数据结构和算法,希望将来从事算法工作为人民作出自己的贡献; 博客内容:tr...
分类:其他好文   时间:2014-05-04 18:22:16    阅读次数:381
uva 11992 线段树对矩阵进行更新查询
http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=3143 把矩阵变成一行,然后计算位置,lrj给了线段树数组做法 但是我做的线段树空间过大,直接爆掉,所以换方法了 主要还是测试自己的线段树区间更新的模板 各种RE+WA之后AC,,,,, ...
分类:其他好文   时间:2014-05-04 18:06:36    阅读次数:412
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!