码迷,mamicode.com
首页 >  
搜索关键字:reverse    ( 5099个结果
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. Add the two numbers and return it as a link...
分类:其他好文   时间:2015-01-30 15:55:05    阅读次数:196
leetcode 2 Add Two Numbers 方法2
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 l...
分类:其他好文   时间:2015-01-30 10:55:06    阅读次数:293
Leetcode#151 Reverse Words in a String
原题地址将单词按空格分词,然后倒序拼接即可代码: 1 void reverseWords(string &s) { 2 vector words; 3 4 int start = -1; 5 int len = 0; 6 ...
分类:其他好文   时间:2015-01-30 10:30:11    阅读次数:157
1015. Reversible Primes (20)
Areversibleprimeinanynumbersystemisaprimewhose"reverse"inthatnumbersystemisalsoaprime.Forexampleinthedecimalsystem73isareversibleprimebecauseitsrevers...
分类:其他好文   时间:2015-01-30 07:52:34    阅读次数:145
Leetcode#150 Evaluate Reverse Polish Notation
原题地址基本栈操作。注意数字有可能是负的。代码: 1 int toInteger(string &s) { 2 int res = 0; 3 bool negative = s[0] == '-' ? true : false; 4 5 for (int i = neg...
分类:其他好文   时间:2015-01-29 20:56:23    阅读次数:164
寒假集训.Reverse Root
B - Reverse Root Time Limit:2000MS     Memory Limit:65536KB     64bit IO Format:%I64d & %I64u Submit Status Description The problem is so easy, that the authors were lazy to write a ...
分类:其他好文   时间:2015-01-29 14:38:16    阅读次数:99
Reverse Integer
Reverse digits of an integer.Example1:x = 123, return 321Example2:x = -123, return -321解法一:public class Solution { public int reverse(int x) { ...
分类:其他好文   时间:2015-01-29 00:00:26    阅读次数:313
LeetCode --- 7. Reverse Integer
题目链接:Reverse Integer Reverse digits of an integer. Example1: x = 123, return 321 Example2: x = -123, return -321 Have you thought about this? Here are some good questions to ask before coding. Bo...
分类:其他好文   时间:2015-01-28 14:47:05    阅读次数:156
leetcode.7-----------Reverse Integer
Reverse digits of an integer. Example1: x = 123, return 321 Example2: x = -123, return -321 Have you thought about this? Here are some good questions to ask before coding. Bonus points for y...
分类:其他好文   时间:2015-01-28 10:00:47    阅读次数:161
leetcode_7_Reverse Integer
思路倒是简洁明了,将整数的非符号部分的各位存储到一个数组里面,然后将各位组装起来就成为一个新的整数。当然,溢出,符号都是需要考虑的。...
分类:其他好文   时间:2015-01-28 09:43:02    阅读次数:93
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!