题目:Given an input string, reverse the string word by word.For example,Given s = "the sky is blue",return "blue is sky the".要求:1)首尾有空格的时候,反转后的string要将空...
分类:
其他好文 时间:
2014-07-16 19:29:54
阅读次数:
234
daniel@daniel-mint /usr/lib/ghc/haskell2010-1.1.1.0 $ tree.├── Control│ └── Monad.hi├── Data│ ├── Array.hi│ ├── Bits.hi│ ├── Char.hi│ ├── Complex.hi│ ...
分类:
其他好文 时间:
2014-07-14 20:35:19
阅读次数:
225
原list: ( ( 1 2 ) ( 3 4 ) )
转置: ( ( 3 4 ) ( 1 2 ) )
深度转置: ( ( 4 3 ) ( 2 1 ) )
( define tree ( list 1 ( list 2 ( list 3 4 ) 5 ) ( list 6 7 ) ) )
( define nil '() )
( define ( my-reverse items...
分类:
其他好文 时间:
2014-07-14 13:04:42
阅读次数:
170
题目:Given an input string, reverse the string word by word.For example,Given s = "the sky is blue",return "blue is sky the". 1 public String reverseWor...
分类:
其他好文 时间:
2014-07-14 09:06:02
阅读次数:
176
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 digit. Add the two numbers and return it as a link...
分类:
其他好文 时间:
2014-07-13 18:20:52
阅读次数:
202
//将字符串反转,但单词不倒置。#include#includevoid reverse(char *s){ char data[255][255];//将s中的空格和非空格子串进行存储 int row = 0,column = 0; int i,j,k; for(i=0;s[i];) { data...
分类:
其他好文 时间:
2014-07-13 09:31:51
阅读次数:
202
翻转单词顺序 代码(C)本文地址: http://blog.csdn.net/caroline_wendy题目: 输入一个英文句子, 翻转句子中单词的顺序, 但单词内字符的顺序不变.首先翻转(reverse)整个句子, 然后查找空格, 如遇到空格, 则翻转前面的单词, 或遇到结束符, 同样进行翻转.代码:/*
* main.cpp
*
* Created on: 2014.6.12
* ...
分类:
其他好文 时间:
2014-07-12 22:56:00
阅读次数:
328
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-12 22:43:17
阅读次数:
267
[LeetCode]Reverse Words in a String...
分类:
其他好文 时间:
2014-07-12 20:46:45
阅读次数:
248
Problem Description:
Given a linked list, reverse the nodes of a linked list k at a time and return its modified list.
If the number of nodes is not a multiple of k then left-out nodes in the...
分类:
其他好文 时间:
2014-07-12 19:00:26
阅读次数:
235