DescriptionYour task is to calculate the sum of
some integers.InputInput contains an integer N in the first line, and then N
lines follow. Each line s...
分类:
其他好文 时间:
2014-05-23 06:41:47
阅读次数:
298
Determine whether an integer is a palindrome.
Do this without extra space.if use recursive, like check the first dig and last
dig, then remove them, c...
分类:
其他好文 时间:
2014-05-23 02:45:15
阅读次数:
230
Reverse digits of an integer.Example1:x = 123,
return 321Example2:x = -123, return -321 1 class Solution { 2 public: 3 int
reverse(int x) { 4 ...
分类:
其他好文 时间:
2014-05-22 16:26:23
阅读次数:
165
The number of 1 bits in an integer.
分类:
其他好文 时间:
2014-05-22 01:21:04
阅读次数:
214
Evaluate the value of an arithmetic expression
inReverse Polish Notation.Valid operators are+,-,*,/. Each operand may be an
integer or another express...
分类:
其他好文 时间:
2014-05-22 00:49:57
阅读次数:
311
【题目】
Given an unsorted integer array, find the first missing positive integer.
For example,
Given [1,2,0] return 3,
and [3,4,-1,1] return 2.
Your algorithm should run in O(n) time and uses constant space.
【题意】
给定一个数组,找出第一个缺失的正数。时间复杂度O(n)
...
分类:
其他好文 时间:
2014-05-21 17:13:07
阅读次数:
219
【题目】
The count-and-say sequence is the sequence of integers beginning as follows:
1, 11, 21, 1211, 111221, ...
1 is read off as "one 1" or 11.
11 is read off as "two 1s" or 21.
21 is read off as "one 2, then one 1" or 1211.
Given an integer n, generate...
分类:
其他好文 时间:
2014-05-21 15:20:07
阅读次数:
213
最近移植uip1.0到stm32上,能udp收发数据,但是ping不通。感觉到很奇怪。以前移植的0.9都能ping通。
由于通过抓包分析。发现icmp echo reply返回的校验值为incorrect。如下图:
ping request
ping reply:
较uip 1.0和uip 0.9移植比较。在uip-conf.h里...
分类:
其他好文 时间:
2014-05-21 14:45:33
阅读次数:
658
Description
In the Fibonacci integer sequence, F0 = 0, F1 = 1, and Fn = Fn ? 1 + Fn ? 2 for n ≥ 2. For example, the first ten terms of
the Fibonacci sequence are:
0, 1, 1, 2, 3, 5, 8, 13, 21, ...
分类:
其他好文 时间:
2014-05-21 09:39:15
阅读次数:
231