/* Write a function reverse(s) that reverses the character string s. Use it to
write a program that reverses its input a line at a time. */
#include
#define MAXLINE 1000 /* maximum input l...
分类:
其他好文 时间:
2015-07-27 23:00:48
阅读次数:
135
Reverse digits of an integer.Example1:x = 123, return 321Example2:x = -123, return -321notice:Have you thought about this?Here are some good questions...
分类:
其他好文 时间:
2015-07-27 22:41:05
阅读次数:
98
Reverse a linked list from position m to n. Do it in-place and in one-pass.
For example:
Given 1->2->3->4->5->NULL, m = 2 and n =
4,
return 1->4->3->2->5->NULL.
Note:
Given m, n satisfy t...
分类:
其他好文 时间:
2015-07-27 11:11:00
阅读次数:
113
逆波兰表示法(Reverse Polish notation,RPN,或逆波兰记法),是一种是由波兰数学家扬·武卡谢维奇1920年引入的数学表达式方式,在逆波兰记法中,所有操作符置于操作数的后面,因此也被称为后缀表示法。逆波兰记法不需要括号来标识操作符的优先级。逆波兰结构由弗里德里希·鲍尔(Friedrich
L. Bauer)和艾兹格·迪科斯彻在1960年代早期提议用于表达式求值,以利用堆栈...
分类:
编程语言 时间:
2015-07-26 15:50:46
阅读次数:
213
LeetCode 2_Add Two Numbers
题目描述:
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. Ad...
分类:
其他好文 时间:
2015-07-26 06:14:59
阅读次数:
131
编写脚本 1,vi?/etc/init.d/nginx #!/bin/sh? # nginx - this script starts and stops the nginx daemon? #? # chkconfig: - 85 15? # description: Nginx is an HTTP(S) server, HTTP(S) reverse? # pr...
分类:
其他好文 时间:
2015-07-25 20:13:46
阅读次数:
152
Print sorted list:colors=['red','green','blue','yellow']for color in sorted(colors): print colorfor color in sorted(colors,reverse=True): print ...
分类:
编程语言 时间:
2015-07-24 23:51:51
阅读次数:
136
原题如下:
Reverse digits of an integer.
Example1: x = 123, return 321
Example2: x = -123, return -321
click to show spoilers.
Have you thought about this?
Here are some good questions to a...
分类:
其他好文 时间:
2015-07-24 13:00:00
阅读次数:
132
【025-Reverse Nodes in k-Group(单链表中k个结点一组进行反转)】【LeetCode-面试算法经典-Java实现】【所有题目目录索引】原题 Given a linked list, reverse the nodes of a linked list k at a time and return its modified list.
If the number of...
分类:
编程语言 时间:
2015-07-24 08:04:47
阅读次数:
143