码迷,mamicode.com
首页 > 其他好文
Binary Tree Level Order Traversal I,II
Given a binary tree, return thelevel ordertraversal of its nodes' values. (ie, from left to right, level by level).For example:Given binary tree{3,9,2...
分类:其他好文   时间:2015-06-10 06:32:56    阅读次数:115
Same Tree
简单题ref“使用的是先序遍历,算法的复杂度跟遍历是一致的,如果使用递归,时间复杂度是O(n),空间复杂度是O(logn)。” by codegankerhttp://blog.csdn.net/linhuanmars/article/details/22839819?Time to search ...
分类:其他好文   时间:2015-06-10 06:32:13    阅读次数:104
Binary Tree Zigzag Level Order Traversal
跟之前的解法一模一样Binary Tree Level Order Traversal I,II 不赘述public class Solution { public ArrayList> zigzagLevelOrder(TreeNode root) { ArrayList> r...
分类:其他好文   时间:2015-06-10 06:31:24    阅读次数:94
天题系列: Recover Binary Search Tree
Two elements of a binary search tree (BST) are swapped by mistake.Recover the tree without changing its structure.Note:A solution using O(n) space is ...
分类:其他好文   时间:2015-06-10 06:32:31    阅读次数:106
Symmetric Tree
有个问题,就是不能和same tree一样光看root 做recursive而是必须比较左右节点,因为对称是指整个树否则就会出现 1 2 2 # 3 3public class Solution { public boolean isSymmetric(TreeNode root) { ...
分类:其他好文   时间:2015-06-10 06:31:42    阅读次数:104
LeetCode Basic Calculator
Implement a basic calculator to evaluate a simple expression string.The expression string may contain open(and closing parentheses), the plus+or minus...
分类:其他好文   时间:2015-06-10 06:33:42    阅读次数:108
ruby日记1
1.irb参数配置~/.irbrcIRB.conf[:PROMPT_MODE] = :SIMPLE #简化 irb 提示符,以及禁用一些烦人的自动缩进行为IRB.conf[:AUTO_INDENT_MODE] = false2.注释:#单行=begin......多行=end3.字符串字符串连接>....
分类:其他好文   时间:2015-06-10 06:30:52    阅读次数:122
导航栏+状态栏+标签栏高度获取方法
导航栏高度获取1 self.navigationController.navigationBar.frame.size.height状态栏高度获取1 [UIApplication sharedApplication].statusBarFrame.size.height标签栏高度获取1 tabVie...
分类:其他好文   时间:2015-06-10 06:31:28    阅读次数:2022
hdu1175连连看
Problem Description“连连看”相信很多人都玩过。没玩过也没关系,下面我给大家介绍一下游戏规则:在一个棋盘中,放了很多的棋子。如果某两个相同的棋子,可以通过一条线连起来(这条线不能经过其它棋子),而且线的转折次数不超过两次,那么这两个棋子就可以在棋盘上消去。不好意思,由于我以前没有玩...
分类:其他好文   时间:2015-06-10 06:31:45    阅读次数:106
自定义控件的常用属性
一、BrowsableAttribute 指定一个属性或者事件是否在“属性”窗口PropertyGrid显示,默认显示二、DisplayNameAttribute 指定一个属性或者事件在"属性"窗口PropertyGrid的显示名称三、CategoryAttribute 指定一个属性或者事件在...
分类:其他好文   时间:2015-06-10 06:28:14    阅读次数:127
总结:man, info, hwclock, cal, type, which, dirname, basename, who, which, whatis, makewhatis, hash, tty
man, info, help, date, hwclock, cal, shutdown, reboot, halt, poweroff, type, cd, which, dirname, basename, who, which, whatis, makewhatis, echo, hash,...
分类:其他好文   时间:2015-06-10 06:30:27    阅读次数:150
Validate Binary Search Tree
Given a binary tree, determine if it is a valid binary search tree (BST).Assume a BST is defined as follows:The left subtree of a node contains only n...
分类:其他好文   时间:2015-06-10 06:27:16    阅读次数:102
COM编程入门不得不看的文章 :第一部分 什么是COM,如何使用COM
原文:http://www.codeproject.com/Articles/633/Introduction-to-COM-What-It-Is-and-How-to-Use-It 本文的目的是为刚刚接触COM的程序员提供编程指南,并帮助他们理解COM的基本概念。内容包括COM规范简介,重要的.....
分类:其他好文   时间:2015-06-10 06:28:37    阅读次数:139
再说mybatis3:Invalid bound statement (not found)
新手使用mybatis3的心酸,应该也只有新手才能体会了,网上一堆解决异常的办法都不起作用,心态不好的话,砸电脑都有可能了,还好,我的心态还可以,承认是自己的学识不够,只能怒而学习之,呵呵,扯得有点多。 最...
分类:其他好文   时间:2015-06-10 01:27:31    阅读次数:1304
vsftpd 流行ftp配置记录说明
vsftpd per-IP方式配置: 需要启用vsftpd的tcp_wrappers集成功能,从版本1.1.3开始支持。 编译时修改builddefs.h文件,将#undef VSF_BUILD_TCPWRAPPER改成#define VSF_BUILD_TCPWRAPPERS并重新编译以启用该功能。...
分类:其他好文   时间:2015-06-10 01:27:14    阅读次数:163
会签的并发控制
目前对会签的表单我们采用了两种不同的方案,也代表两种不同的风格。第一种是moss风格,第二种是通达风格。Moss风格不共用会签区,不同的会签人会签意见签署区不同。这种风格的会签人是固定配置在节点上的,如果会签人不固定,那么会签区表单权限控制就会出现混乱;通达风格则..
分类:其他好文   时间:2015-06-10 01:26:20    阅读次数:153
懒加载一定要记得判断是否存在该对象!
今天发现一个问题搞了一个下午,异步网络加载和表格刷新控件混用的时候,懒加载出现了问题之前我是这样写的/** *初始化表格 */ -(UITableView*)tableView{ _tableView=[[UITableViewalloc] initWithFrame:CGRectMake(0,TABLETOPVIEW_HEIGHT,SCREEN_WIDTH, TABLEVIEW_HEIGHT) s..
分类:其他好文   时间:2015-06-10 01:24:59    阅读次数:519
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!