刚看到这个题目,手痒了.还挺有意思的...
#include int main()
{ char str[] = "Please reverse this string!"; printf("%s\n", str); str_rev(str); printf("%s\n", str); return 0;
}int str_rev(char *stri...
分类:
其他好文 时间:
2015-02-12 21:28:31
阅读次数:
231
题目例如以下:Given an input string, reverse the string word by word.For example,Given s = "the sky is blue",return "blue is sky the".click to show clarifica...
分类:
其他好文 时间:
2015-02-11 14:16:19
阅读次数:
128
leetcode代码利用堆栈:http://oj.leetcode.com/problems/evaluate-reverse-polish-notation/http://oj.leetcode.com/problems/longest-valid-parentheses/ (也可以用一维数组,贪...
分类:
其他好文 时间:
2015-02-10 20:13:24
阅读次数:
351
js中数组的一些方法总结:
1.concat()
连接两个或更多的数组,并返回结果数组
2.join()
把数组的所有元素放入一个字符串。元素通过制定的分隔符进行分隔
3.pop()
删除并返回数组的最后一个元素
4.push()
向数组的末尾添加一个或更多元素,并返回新的长度
5.reverse()
颠倒数组中元素的顺序
6.shift()
删除并返回数组的第一个元素
...
分类:
编程语言 时间:
2015-02-10 15:22:37
阅读次数:
156
Reverse digits of an integer.Example1:x = 123, return 321Example2:x = -123, return -321click to show spoilers.Have you thought about this?Here are som...
分类:
其他好文 时间:
2015-02-10 15:04:23
阅读次数:
161
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-02-10 14:58:25
阅读次数:
163
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-02-10 14:49:49
阅读次数:
135
Reverse digits of an integer.
Example1: x = 123, return 321
Example2: x = -123, return -321
click to showspoilers.
Have you thoughtabout this?
Here are some good questions to ask before coding. B...
分类:
其他好文 时间:
2015-02-10 09:17:49
阅读次数:
155
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...
分类:
其他好文 时间:
2015-02-09 14:03:34
阅读次数:
132
Total Accepted: 421
Total Submissions: 1404
Given an input string, reverse the string word by word. A word is defined as a sequence of non-space characters.
The input string does not conta...
分类:
其他好文 时间:
2015-02-09 08:13:35
阅读次数:
117