码迷,mamicode.com
首页 >  
搜索关键字:reverse intger    ( 5102个结果
[LeetCode] Reverse Linked List II 倒置链表之二
Reverse a linked list from positionmton. Do it in-place and in one-pass.For example:Given1->2->3->4->5->NULL,m= 2 andn= 4,return1->4->3->2->5->NULL.No...
分类:其他好文   时间:2015-03-01 10:25:17    阅读次数:122
Leetcode: Reverse Words in a String II
Given an input string, reverse the string word by word. A word is defined as a sequence of non-space characters.The input string does not contain lead...
分类:其他好文   时间:2015-03-01 08:54:48    阅读次数:160
1015. Reversible Primes
A reversible prime in any number system is a prime whose "reverse" in that number system is also a prime. For example in the decimal system 73 is a reversible prime because its reverse 37 is also a pr...
分类:其他好文   时间:2015-02-28 21:46:29    阅读次数:187
LeetCode-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, return 1->4->3->2->5->NULL. Note: Given m, n...
分类:其他好文   时间:2015-02-28 14:45:09    阅读次数:171
[LeetCode] 007. Reverse Integer (Easy) (C++/Java/Python)
[LeetCode] 007. Reverse Integer (Easy) (C++/Java/Python)...
分类:编程语言   时间:2015-02-28 01:37:23    阅读次数:250
LeetCode2——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 li...
分类:其他好文   时间:2015-02-27 11:54:33    阅读次数:125
[leetcode]Rotate Array
in place交换如果是k步,那么就是把后面k个放到前面了嘛。我们先把整个数组reverse,然后把前面的reverse回来,再把后面的reverse回来对于AB我们要通过reverse操作得到BA那么先把ABreverse一次得到reverse(B)reverse(A)然后再把reverse(B...
分类:其他好文   时间:2015-02-26 21:35:09    阅读次数:138
1015. Reversible Primes (20)
A reversible prime in any number system is a prime whose "reverse" in that number system is also a prime. For example in the decimal system 73 is a reversible prime because its reverse 37 is also a pr...
分类:其他好文   时间:2015-02-25 21:10:58    阅读次数:151
PAT1074. Reversing Linked List
Given a constant K and a singly linked list L, you are supposed to reverse the links of every K elements on L. For example, given L being 1→2→3→4→5→6,...
分类:其他好文   时间:2015-02-24 22:10:07    阅读次数:215
NOIP2011-普及组复赛-第一题-数字反转
题目描述Description 给定一个整数,请将该数各个位上数字反转得到一个新数。新数也应满足整数的常见形式,即除非给定的原数为零,否则反转后得到的新数的最高位数字不应为零(参见样例2)。输入输出格式Input/output输入格式: 输入文件名为reverse.in 。 输入共1 行,一个...
分类:其他好文   时间:2015-02-24 10:16:17    阅读次数:134
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!