波兰(Poland)是个了不起的国家。元素周期表中的放射性元素钋(Po),是居里夫人发现的,是以她的祖国波兰命名的。在计算机科学中常用到的波兰表达式(Polish Notation)、逆波兰表达式(Reverse Polish Notation)也是以波兰命名的。中国也是个了不起的国家,我知道的中国剩余定理(Chinese remainder theorem)是以中国冠名的。其他以中国冠名的物件有中...
分类:
其他好文 时间:
2015-04-21 01:51:49
阅读次数:
113
分析:
先颠倒整个句子,然后。颠倒词的顺序。
例如: I am a teach. 颠倒后:teach a am i
//Reverse the whole string,then reverse each word.
char* reverseFixlen(char *str,int n)
{
char *p=str+n-1;
char *start=str;
while(...
分类:
其他好文 时间:
2015-04-20 22:39:28
阅读次数:
158
Reverse IntegerReverse digits of an integer.Example1:x = 123, return 321Example2:x = -123, return -321题目比较简单,注意越界和负数情况即可!Runtime:16 ms#include #includ...
分类:
其他好文 时间:
2015-04-20 22:05:47
阅读次数:
92
Add BinaryTotal Accepted:39288Total Submissions:158078My SubmissionsQuestionSolutionGiven two binary strings, return their sum (also a binary string)....
分类:
其他好文 时间:
2015-04-20 20:52:08
阅读次数:
200
来源: Backdoor CTF 2015 Little Suzie started learning C. She created a simple program that echo's back whatever you input. Here is the binary file. The ...
分类:
其他好文 时间:
2015-04-20 16:20:20
阅读次数:
318
Given a linked list, reverse the nodes of a linked listkat a time and return its modified list.If the number of nodes is not a multiple ofkthen left-o...
分类:
其他好文 时间:
2015-04-20 14:44:04
阅读次数:
98
这个题居然没有记录。原地旋转数组可以见编程珠玑,在JDK代码中也可以找到(Collections.rotate),提供了两种方式一种是做三次reverse,还有一种则是进行遍历替换。第一种方式: 1 class Solution { 2 public: 3 void rotate(int n...
分类:
编程语言 时间:
2015-04-20 12:40:12
阅读次数:
122
题目:
Reverse digits of an integer.
Example1: x =
123, return 321
Example2: x = -123, return -321
翻译就是把一个数字反过来输出。
解题思路:这道题目看起来比较简单。无非就是一个数字取个位,作为另一个高位。无非是在10的运算。
代码1: public static int rever...
分类:
其他好文 时间:
2015-04-20 11:15:49
阅读次数:
130
Reverse bits of a given 32 bits unsigned integer.For example, given input 43261596 (represented in binary as00000010100101000001111010011100), return ...
分类:
其他好文 时间:
2015-04-20 11:01:21
阅读次数:
128
You are given two linked lists representing two non-negative numbers. The digits are stored in reverse order and each of their nodes contain a single ...
分类:
其他好文 时间:
2015-04-19 17:48:57
阅读次数:
127