Reverse digits of an integer.
Example1: x = 123, return 321
Example2: x = -123, return -321
class Solution
{
public:
int reverse(int x)
{
if(x>2147483647 || x <= -2147483648 |...
分类:
其他好文 时间:
2015-01-08 09:43:00
阅读次数:
180
函数reverse_string(char * string)
实现:将参数字符串中的字符反向排列。
要求:不能使用C函数库中的字符串操作函数。
#include
#include
#define SWAP(a,b,c) ((c)=(a),(a)=(b),(b)=(c))
void reverse_string(char * s)
{
char *p=s;
char t...
分类:
编程语言 时间:
2015-01-07 23:36:54
阅读次数:
262
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...
分类:
其他好文 时间:
2015-01-07 20:54:50
阅读次数:
140
原题链接: https://oj.leetcode.com/problems/reverse-integer/
做法直接看代码,无需对负数做特殊处理。但是必须考虑溢出的情况,考虑溢出的判断则将res * 10 + num % 10
class Solution {
public:
int reverse(int x) {
int num = x;
...
分类:
其他好文 时间:
2015-01-07 16:49:51
阅读次数:
142
英文原文:Reverse Ajax, Part 5: Event-driven web development 前言 这一文章系列展示了如何使用反向Ajax(Reverse Ajax)技术开发事件驱动的web应用,第1部分内容介绍了反向Ajax、轮询(polling)、流(streaming)、.....
分类:
Web程序 时间:
2015-01-07 16:47:33
阅读次数:
205
英文原文:Reverse Ajax, Part 2: WebSockets 前言 时至今日,用户期待的是可通过web访问快速、动态的应用。这一文章系列展示了如何使用反向Ajax(Reverse Ajax)技术来开发事件驱动的web应用。该系列的第1部分介绍了反向Ajax、轮询(polling)、.....
分类:
Web程序 时间:
2015-01-07 16:44:36
阅读次数:
381
英文原文:Reverse Ajax, Part 1: Introduction to Comet在过去的几年中,web开发已经发生了很大的变化。现如今,我们期望的是能够通过web快速、动态地访问应用。在这一新的文章系列中,我们学习如何使用反向Ajax(Reverse Ajax)技术来开发事件驱动的....
分类:
Web程序 时间:
2015-01-07 16:39:46
阅读次数:
169
英文原文:Reverse Ajax, Part 3: Web servers and Socket.IO 前言 时至今日,用户期待的是可通过web访问快速、动态的应用。这一文章系列展示了如何使用反向Ajax(Reverse Ajax)技术来开发事件驱动的web应用。系列的第1部分介绍了反向Aja.....
分类:
Web程序 时间:
2015-01-07 16:36:03
阅读次数:
346
英文原文:Reverse Ajax, Part 4: Atmosphere and CometD 前言 这一系列文章展示了如何使用反向Ajax技术开发事件驱动的web应用,第1部分内容介绍了反向Ajax(Reverse Ajax)、polling(轮询)、streaming(流)、Comet和长.....
分类:
Web程序 时间:
2015-01-07 16:32:55
阅读次数:
202
Reverse digits of an integer.
Example1: x = 123, return 321
Example2: x = -123, return -321
click to show spoilers.
Show Tags
题意:将数...
分类:
其他好文 时间:
2015-01-07 11:05:36
阅读次数:
118