码迷,mamicode.com
首页 >  
搜索关键字:up    ( 7825个结果)
(017)将一棵二叉查找树重构成链表(keep it up)
给定一棵二叉查找树,设计算法,将每一层的所有结点构建为一个 链表(也就是说, 如果树有D层,那么你将构建出D个链表). 这个题实质是个BFS,但是实现起来有点麻烦,又不像常见的BFS, 所以编写代码时有点艰难。 下面的代码使用两个list来实现层次遍历的,首先用Cur链表存储当前层 的结点,然后用Pre链表存储当前层的子层结点,Cur和Pre。下一次遍历时 Pre就变成当前层,Cur就...
分类:其他好文   时间:2014-09-01 01:40:22    阅读次数:246
UVA 6480 Zombie Invasion(模拟退火)
A group of survivors has arrived by helicopter to an isolated island. The island is made up of a long narrow strip of villages. The infected survivors arrived in the village to the far east and accid...
分类:其他好文   时间:2014-09-01 00:31:02    阅读次数:277
关于xcode重构选项的一些理解
Rename(重命名):对标示符进行重命名,以获得更好的代码可读性,这些标示符包括类,方法或者函数的名称. Extract(抽取):将你在XCode种选择的代码抽取到一个新的方法或函数中. Create SuperClass(创建父类):为Xcode中当前所选的类定义父类 Move Up(上移):将所选择的方法,属性,或实例变量从一个类移至其父类,子类和父类均在项目中有定义 Move Do...
分类:其他好文   时间:2014-08-31 23:02:52    阅读次数:296
Leetcode dfs Path Sum
Path Sum  Total Accepted: 20393 Total Submissions: 66674My Submissions 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...
分类:其他好文   时间:2014-08-31 21:33:41    阅读次数:284
2013-2014年度总结
转眼间,一年就过去了。似乎这句话,每次用都很合适。所有的场景似乎都只在昨天。一年的收获,知识上的没有值得可说的,只能说是学的多了,才发现自己不懂的实在太多了。一年前的井底之蛙,正在逐渐Up、Up。成长最多的无非就是为人处事。不妨一一道来。     自13年9月开始,学习到现在,翻看一下培养计划,似乎没有学到什么东西。唯一值得一提的就是C/S软件工程了。这个项目持续了将近一年。还有就是三个月左右的...
分类:其他好文   时间:2014-08-31 17:21:23    阅读次数:232
WebRTC in the real world: STUN, TURN and signaling
What is signaling? Signaling is the process of coordinating communication. In order for a WebRTC application to set up a 'call', its clients need to exchange information: Session control message...
分类:Web程序   时间:2014-08-31 00:31:25    阅读次数:1000
Agile实践日志(2)-- Daily Stand up 和 Retrospective Session
Agile实践日志(2)-- Daily Stand up 和 Retrospective Session...
分类:其他好文   时间:2014-08-30 19:07:29    阅读次数:221
Beautiful Day
The heart is a bloom #青春 绽放 茂盛 Shoots up through the stony ground #嫩枝 There''s no room No space to rent in this town You''re out of luck And the reaso...
分类:其他好文   时间:2014-08-30 09:54:09    阅读次数:189
(016)给定一个有序数组(递增),写程序构建一棵具有最小高度的二叉树(keep it up)
给定一个有序数组(递增),写程序构建一棵具有最小高度的二叉树。 由于数组是递增有序的,每次都在中间创建结点,类似二分查找的方法来间最小树。 struct TreeNode { int data; TreeNode* leftChild; TreeNode* rightChild; }; void newNode(TreeNode*& vNode, int vData) { vNode...
分类:其他好文   时间:2014-08-30 02:24:58    阅读次数:260
LeetCode 112 Path Sum
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. For example: Given the below binary tree and sum ...
分类:其他好文   时间:2014-08-29 22:42:32    阅读次数:328
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!