$ dmesg | grep clock
[0.000000] OMAP clocksource: GPTIMER1 at 24000000 Hz
[0.000000] sched_clock: 32 bits at 24MHz, resolution 41ns, wraps every 178956ms...
分类:
系统相关 时间:
2014-07-18 16:39:51
阅读次数:
449
Not very hard to figure out the solution: splitting the list into 2 halves; reverse the 2nd half and interleave the two halves.But it takes some time ...
分类:
其他好文 时间:
2014-07-18 14:35:09
阅读次数:
214
Evaluate the value of an arithmetic expression in Reverse Polish Notation.
Valid operators are +, -, *, /.
Each operand may be an integer or another expression.
Some examples:
["2", "1", ...
分类:
其他好文 时间:
2014-07-18 11:19:56
阅读次数:
210
Reverse IntegerReverse digits of an integer.Example1:x = 123, return 321Example2:x = -123, return -321click to show spoilers.Have you thought about th...
分类:
其他好文 时间:
2014-07-18 09:34:59
阅读次数:
212
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.No...
分类:
其他好文 时间:
2014-07-18 00:32:24
阅读次数:
271
class Solution {public: void reverseWords(string &s) { int len = s.length(); if(len == 0) return; vector res; ...
分类:
其他好文 时间:
2014-07-16 18:50:12
阅读次数:
161
Problem: Implement a function to check if a singly linked list is a palindrome.思路:最简单的方法是 Reverse and compare.另外一种非常经典的办法是用 Recursive 的思路,把一个list看成这种形...
分类:
其他好文 时间:
2014-07-16 17:41:23
阅读次数:
188
比如我想将 “javascript”反转为 “tpircsavaj”。我们一般处理都是用for循环然后用StringBuffer一个字符一个字符添加。
其实StringBuffer提供了一个reverse方法就可以实现。测试代码如下:
package com.evan;
public class ReverseTest {
public static void main(String[]...
分类:
编程语言 时间:
2014-07-16 17:19:54
阅读次数:
202
/*
调用方式:add(a, b);
返回类型:string
*/
string add(string a, string b)
{
string s;
reverse(a.begin(), a.end());
reverse(b.begin(), b.end());
int i = 0;
int m, k = 0;
while(a[i] && b...
分类:
其他好文 时间:
2014-07-16 08:04:51
阅读次数:
368
在计算机领域中,灰度(Gray scale)数字图像是每个像素只有一个采样颜色的图像。这类图像通常显示为从最暗黑色到最亮的白色的灰度,尽管理论上这个采样可以任何颜色的不同深浅,甚至可以是不同亮度上的不同颜色。灰度图像与黑白图像不同,在计算机图像领域中黑白图像只有黑白两种颜色,灰度图像在黑色与白色之间还有许多级的颜色深度。用于显示的灰度图像通常用每个采样像素8 bits的非线性尺度来保存,这样可以有...
分类:
编程语言 时间:
2014-07-15 13:15:02
阅读次数:
337