码迷,mamicode.com
首页 >  
搜索关键字:same tree    ( 20551个结果
linux基础命令学习(一)
pwd 输出当前工作路径tree 以树状图列出目录的内容ctrl+c 取消命令的执行clear 清空屏幕ls 列出文件目录 蓝色是目录,白色是普通文件alias cls=clear 别名终端:本地终端、远程虚拟终端tty:哪个终端登录Alt F1切换终端登录w:查看多少人登录id/groups以.开...
分类:系统相关   时间:2014-05-08 14:26:41    阅读次数:479
MySQL错误Another MySQL daemon already running with the same unix socket
今天遇到RT这个问题后,导致数据库错误,然后在国外网站发现了一个解决方法,记录如下:原因是:多个Mysql进程使用了同一个socket。解决方法是:直接把mysql.sock文件改名即可。也可以删除,推荐改名。SSH里输入下列命令即可解决:# mv /var/lib/mysql/mysql.sock...
分类:数据库   时间:2014-05-08 13:08:22    阅读次数:293
Leetcode:Max Points on a Line
Given n points on a 2D plane, find the maximum number of points that lie on the same straight line. 解题想法: 其实判断一个直线上最好的方法是判断斜率。如果在同一直线上,那么直线上一点与其他点的斜率相...
分类:其他好文   时间:2014-05-07 21:13:02    阅读次数:323
关联容器(底层机制) — 红黑树
set、map、multiset、multimap四种关联式容器的内部都是由红黑树实现的。在STL中红黑树是一个不给外界使用的独立容器。既然是容器,那么就会分配内存空间(节点),内部也会存在迭代器。关于红黑树的一些性质,可以参考“数据结构”中的笔记,这里只记录STL中的红黑树是如何实现的。 和slist一样,红黑树的节点和迭代器均采用了双层结构: 节点:__rb_tree_no...
分类:其他好文   时间:2014-05-07 15:55:28    阅读次数:487
SVN :This XML file does not appear to have any style information associated with it.
SVN :This XML file does not appear to have any style information associated with it. The document tree is shown below.地址输入错误。尼玛。。。
分类:移动开发   时间:2014-05-07 15:01:54    阅读次数:1113
【LeetCode】Binary Tree Preorder Traversal
题目 Given a binary tree, return the preorder traversal of its nodes' values. For example: Given binary tree {1,#,2,3}, 1 2 / 3 return [1,2,3]. Note: Recursiv...
分类:其他好文   时间:2014-05-07 03:30:19    阅读次数:254
红黑树(一)之 原理和算法
R-B Tree简介 Red-Black Tree,是一种特殊的二叉查找树。红黑树的每个节点上都有存储位表示节点的颜色,即红(Red)或黑(Black)。红黑树的特性:(1)每个节点是黑或红。(2)根节点是黑色。(3)每个叶子节点(NIL)是黑色。[注意:这里叶子节点,是指为空(NIL或NULL)....
分类:其他好文   时间:2014-05-07 01:53:34    阅读次数:570
Leetcode | Populating Next Right Pointers in Each Node I & II
Populating Next Right Pointers in Each Node IGiven a binary tree struct TreeLinkNode { TreeLinkNode *left; TreeLinkNode *right; TreeLin...
分类:其他好文   时间:2014-05-07 01:34:51    阅读次数:407
leetcode -day9 Candy & Gas Station & Binary Tree Maximum Path Sum
1、 ?? Candy There are N children standing in a line. Each child is assigned a rating value. You are giving candies to these children subjected to the following requirements: Each child must h...
分类:其他好文   时间:2014-05-06 22:41:02    阅读次数:427
how many does the factorial of n have zero?
n! 末尾有多少个 0 个人信息:就读于燕大本科软件工程专业 目前大三; 本人博客:google搜索“cqs_2012”即可; 个人爱好:酷爱数据结构和算法,希望将来从事算法工作为人民作出自己的贡献; 博客内容:travel the binary tree by level 5 ( from down to top and from left to right ever...
分类:其他好文   时间:2014-05-06 21:19:02    阅读次数:554
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!