码迷,mamicode.com
首页 >  
搜索关键字:reverse intger    ( 5102个结果
Leetcode 7 Reverse Integer
Reverse digits of an integer.Example1:x = 123, return 321Example2:x = -123, return -321题目解析:你要是敢用string解你就输了!!一位一位运算吧骚年, 没啥好解释的, 注意overflow和负数情况就行~ 1 ...
分类:其他好文   时间:2015-02-15 12:01:46    阅读次数:104
leetcode_92_Reverse Linked List II
欢迎大家阅读参考,如有错误或疑问请留言纠正,谢谢 Reverse Linked List II  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, ret...
分类:其他好文   时间:2015-02-15 10:49:55    阅读次数:163
leetcode_2_Add Two Numbers
欢迎大家阅读参考,如有错误或疑问请留言纠正,谢谢 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 dig...
分类:其他好文   时间:2015-02-14 17:35:31    阅读次数:201
Reverse words in a string
刚看到这个题目,手痒了.还挺有意思的... #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
leetcode——Reverse Words in a String 旋转字符串中单词顺序(AC)
题目例如以下: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
转载 ACM训练计划
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数组对象的方法
js中数组的一些方法总结: 1.concat() 连接两个或更多的数组,并返回结果数组 2.join() 把数组的所有元素放入一个字符串。元素通过制定的分隔符进行分隔 3.pop() 删除并返回数组的最后一个元素 4.push() 向数组的末尾添加一个或更多元素,并返回新的长度 5.reverse() 颠倒数组中元素的顺序 6.shift() 删除并返回数组的第一个元素 ...
分类:编程语言   时间:2015-02-10 15:22:37    阅读次数:156
leetcode[7]Reverse Integer
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
leetcode[25]Reverse Nodes in k-Group
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
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 ...
分类:其他好文   时间:2015-02-10 14:49:49    阅读次数:135
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!