程序仅供学习。 1 #!/usr/bin/python 2 import os 3 import time 4 ip=raw_input("Enter the ip,example: 192.168.1.0-254:\n") 5 service = raw_input("Enter the Ser....
分类:
编程语言 时间:
2014-06-24 08:52:55
阅读次数:
489
Given a sorted linked list, delete all nodes that have duplicate numbers, leaving only distinct numbers from the original list.
For example,
Given 1->2->3->3->4->4->5, return 1->2->5.
Given 1->1-...
分类:
其他好文 时间:
2014-06-22 22:57:49
阅读次数:
347
Given numRows, generate the first
numRows of Pascal's triangle.
For example, given numRows = 5,
Return
[
[1],
[1,1],
[1,2,1],
[1,3,3,1],
[1,4,6,4,1]
]
解题思路:
杨辉三角没什么好说的...
分类:
其他好文 时间:
2014-06-22 22:48:11
阅读次数:
305
Given an index k, return the
kth row of the Pascal's triangle.
For example, given k = 3,
Return [1,3,3,1].
Note:
Could you optimize your algorithm to use only
O(k) extra space?
...
分类:
其他好文 时间:
2014-06-22 21:31:26
阅读次数:
214
Given a binary tree, return the postorder traversal of its nodes' values.
For example:
Given binary tree {1,#,2,3},
1
2
/
3
return [3,2,1].
Note: Recursive solut...
分类:
其他好文 时间:
2014-06-22 20:58:01
阅读次数:
157
MainActivity.java
package org.example.guess;
import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.ImageBut...
分类:
移动开发 时间:
2014-06-22 19:11:50
阅读次数:
1100
Given a triangle, find the minimum path sum from top to bottom. Each step you may
move to adjacent numbers on the row below.
For example, given the following triangle
[
[2],...
分类:
其他好文 时间:
2014-06-22 17:07:52
阅读次数:
166
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: Recursive soluti...
分类:
其他好文 时间:
2014-06-22 16:37:51
阅读次数:
168
题目要求:
Input a value n, then print out a N×N matrix.
Example 1: Input 2, then
1 2
4 3
Example2: Input 4, then
1 2 3 4
12 13 14 5
11 16 15 6
10 9 8 7
Please write a program to...
分类:
其他好文 时间:
2014-06-22 00:38:02
阅读次数:
409
Given two binary strings, return their sum (also a binary string).
For example,
a = "11"
b = "1"
Return "100".
求数字字符串的二进制和。同之前的数组代表数字,两个数组相加一样,只不过进位变成了2.可能两个串的长度不一样,故逆转,从左到右加下去,最后再逆转。
publi...
分类:
其他好文 时间:
2014-06-21 20:11:21
阅读次数:
344