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-20 11:44:06
阅读次数:
82
直接上代码://写?一个 返回值为整型 参数为NSString(仅?一个参
// 数)的block,实现将字符串转换为整型的功能。// int (NSString *string) {
// return [string intValue] ;
// }// 把^int (NSString *string)赋值给int (^myBlock)(NSString *)...
分类:
编程语言 时间:
2015-06-20 10:35:04
阅读次数:
120
写字段的时候一般会这么写:1 private string _msg;2 3 public string Msg4 {5 get { return _msg; }6 set { _msg = value; }7...
分类:
其他好文 时间:
2015-06-20 10:33:13
阅读次数:
108
Use Exception Rather than Return Code(使用异常而不是错误处理) public class DeviceController {...
public void sendShutDown() {
DeviceHandle handle = getHandle(DEV1);
// Check the state of the d...
分类:
其他好文 时间:
2015-06-20 09:12:51
阅读次数:
133
安装bottle:[root@jubottle]#yuminstallpython-develpython-setuptools-y[root@jubottle]#easy_installpip[root@jubottle]#pipinstallbottle官方文档:http://www.bottlepy.org/docs/dev/index.html静态路由[root@jubottle]#vimfirst.py
#/usr/bin/envpython
#coding=utf-8
fro..
分类:
其他好文 时间:
2015-06-20 01:37:59
阅读次数:
494
Description:Given a binary tree, return thezigzag level ordertraversal of its nodes' values. (ie, from left to right, then right to left for the next ...
分类:
其他好文 时间:
2015-06-20 01:26:26
阅读次数:
185
Given a linked list, return the node where the cycle begins. If there is no cycle, returnnull.Follow up:Can you solve it without using extra space?同Le...
分类:
其他好文 时间:
2015-06-20 00:15:40
阅读次数:
121
Description:Given numRows, generate the first numRows of Pascal's triangle.For example, given numRows = 5, Return[ [1], [1,1], [1,2,1], [1,3...
分类:
其他好文 时间:
2015-06-19 23:05:50
阅读次数:
183
定义局部最小的概念。arr长度为1时,arr[0]是局部最小。arr的长度为N(N>1)时,如果arr[0] arr) { if(arr.size() == 0) return -1; if(arr.size...
分类:
其他好文 时间:
2015-06-19 23:03:22
阅读次数:
163
Description:Given an index k, return the kth row of the Pascal's triangle.For example, given k = 3, Return [1,3,3,1].public class Solution { public...
分类:
其他好文 时间:
2015-06-19 22:58:21
阅读次数:
172