链接:http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemId=151For each list
of words, output a line with each word reversed without changing the or...
分类:
其他好文 时间:
2014-06-10 00:14:19
阅读次数:
300
二分查找图二叉树:代码#!/usr/bin/python#-*-coding:utf-8-*-#----------------------------------------------------------------------------------------#
to_do : bin....
分类:
编程语言 时间:
2014-06-09 23:06:48
阅读次数:
295
题目:Reverse a linked list from positionmton. Do it
in-place and in one-pass.For example:Given1->2->3->4->5->NULL,m=
2 andn= 4,return1->4->3->2->5->NULL...
分类:
其他好文 时间:
2014-06-09 23:03:18
阅读次数:
254
常见的编程错误:浮点值是近似的,如果用浮点值变量控制计数器循环,那么会产生不精确的计数器值,并导致对终止条件的不准确测试错误预防技巧:使用整数值控制计数器循环良好的编程习惯:在每条控制语句的前后加入空行,可以使它在程序中突出显示过多层的嵌套会使程序难以理解,设法避免使用超过三层的嵌套在控制语句之上和...
分类:
编程语言 时间:
2014-06-09 00:02:16
阅读次数:
566
代码#!/usr/bin/python#-*-coding:utf-8-*-#----------------------------------------------------------------------------------------#
to_do : bubble sort#....
分类:
编程语言 时间:
2014-06-08 23:51:58
阅读次数:
461
题目:
Determine whether an integer is a palindrome. Do this without extra space.
解题思路:
判断一个int型整数是不是回文数字,这个题也不难,依次取得数字最高位和最低位进行比较,就可以判断是不是回文数字。需要注意的是负数不是回文数字。
代码实现:...
分类:
其他好文 时间:
2014-06-08 15:35:48
阅读次数:
375
#!/bin/sh
while true
do
ps | grep "my_app" | grep -v "grep" > /dev/null
#第一二个命令输出my_app的运行情况,第二个命令去掉带有grep的条目,然后把结果重定向到null里面不要回显
if [ "$?" -eq 1 ] # 1 : 表示有 ; 0 :表示没有
then
./my_app &...
分类:
系统相关 时间:
2014-06-08 10:06:03
阅读次数:
346
这篇文章记录了在 IOS 中使用 Swift 操作 CoreData 的一些基础性内容,由于缺乏文档,基本上都是自行实验的结果,错漏不可避免,还请谅解。...
分类:
移动开发 时间:
2014-06-08 04:56:39
阅读次数:
419
You are given an n x n 2D matrix representing
an image.Rotate the image by 90 degrees (clockwise).Follow up:Could you do this
in-place?实现题。从最外圈顺时针交换,最...
分类:
其他好文 时间:
2014-06-07 20:33:17
阅读次数:
283
1 //break是结束整个循环体,退出了整个while循环 2 3 int x = 0; 4
while (x++ < 10) 5 { 6 if (x == 3) 7...
分类:
其他好文 时间:
2014-06-07 16:53:19
阅读次数:
190