1. Question确定一个数是否是回文数。要求不使用额外空间。Determine whether an integer is a palindrome. Do this without extra space.2. Solution如果是负数,就不是回文数。2.1 reverse integer...
分类:
其他好文 时间:
2015-06-23 23:04:49
阅读次数:
132
1. Question反转一个整数的数位(注意溢出情况)Reverse digits of an integer.Example1: x = 123, return 321Example2: x = -123, return -3212. Solution2.1 整除取余法 1 public cla...
分类:
其他好文 时间:
2015-06-23 21:32:58
阅读次数:
100
7 Reverse Integer链接:https://leetcode.com/problems/reverse-integer/
问题描述:
Reverse digits of an integer.Example1: x = 123, return 321
Example2: x = -123, return -321click to show spoilers.Have you th...
分类:
其他好文 时间:
2015-06-23 18:06:57
阅读次数:
90
题目描述: Reverse a singly linked list. 这道题太经典了,解法有两种,递归和非递归。 见反转单链表
分类:
其他好文 时间:
2015-06-23 13:23:36
阅读次数:
82
Reverse Linked List
Reverse a singly linked list.
click to show more hints.
Hint:
A linked list can be reversed either iteratively or recursively. Could you implement both?
反转一个链表,用栈实现
...
分类:
其他好文 时间:
2015-06-23 10:18:18
阅读次数:
117
#6 ZigZag Conversion
The string "PAYPALISHIRING" is written in a zigzag pattern on a given number of rows like
this: (you may want to display this pattern in a fixed font for better legibility)...
分类:
其他好文 时间:
2015-06-22 22:25:11
阅读次数:
181
Reverse bits of a given 32 bits unsigned integer.For example, given input 43261596 (represented in binary as 00000010100101000001111010011100), return 964176192 (represented in binary as00111001011110...
分类:
其他好文 时间:
2015-06-22 16:29:49
阅读次数:
167
Description:Given an input string, reverse the string word by word.For example,Given s = "the sky is blue",return "blue is sky the".Code: 1 void re...
分类:
其他好文 时间:
2015-06-21 18:21:31
阅读次数:
113
Reverse Nodes in k-GroupTotal Accepted:34390Total Submissions:134865My SubmissionsQuestionSolutionGiven a linked list, reverse the nodes of a linked l...
分类:
其他好文 时间:
2015-06-21 17:14:03
阅读次数:
108
Add Two NumbersYou are given two linked lists representing two non-negative numbers. The digits are stored in reverse order and each of their nodes co...
分类:
编程语言 时间:
2015-06-21 17:03:25
阅读次数:
185