码迷,mamicode.com
首页 >  
搜索关键字:reverse    ( 5099个结果
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 al...
分类:其他好文   时间:2015-05-25 14:39:05    阅读次数:140
leetcode刷题: 002 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-05-25 14:20:09    阅读次数:97
hdu 2031 进制转换 (java)
问题: 在c中字符间转化可以以char a=char(b+5);的方式,但在java中却没用,这里给出一种转化方法:int c=b+5;char a=char(c); String字符串,倒过来: StringBffer str=new StringBuffer(s); s=str.reverse().toString(); 在测试时加入了一些输出语句,和一些小改动,在输出时忘记改回...
分类:编程语言   时间:2015-05-25 10:04:57    阅读次数:137
LeetCode【2】. Add Two Numbers--java实现
第二道题 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 singl...
分类:编程语言   时间:2015-05-23 08:50:29    阅读次数:190
杭电ACM1321——Reverse Text~~逆序输出字符串
简单的字符串逆序输出。 AC代码: #include #include using namespace std; int main() { char str[100000]; int n; while(cin >> n) { getchar(); for(int i = 0; i < n; i++) { gets(str); int length = st...
分类:其他好文   时间:2015-05-22 17:13:25    阅读次数:110
【leetcode】Reverse Linked List(easy)
Reverse a singly linked list.思路:没啥好说的。秒...ListNode* reverseList(ListNode* head) { ListNode * rList = NULL, * tmp = NULL; while(head != N...
分类:其他好文   时间:2015-05-21 12:19:41    阅读次数:145
LeetCode——Reverse Linked List
反转链表,用了一个比较笨的方法。public class Solution { public ListNode reverseList(ListNode head) { if(head == null || head.next == null) retur...
分类:其他好文   时间:2015-05-21 00:00:01    阅读次数:285
leetcode 2 -- Add Two Numbers
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 digit. Add t...
分类:其他好文   时间:2015-05-20 16:22:34    阅读次数:110
Java for LeetCode 092 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->...
分类:编程语言   时间:2015-05-20 11:10:04    阅读次数:280
javascript数组对象实例方法
javascript数组对象实例方法有:pop(),push(),reverse(),shift(),sort(),splice(),unshift(),concat(),join(),slice()pop() : 移除数组中最后一个元素,并返回该元素。 如下:var a=[1,2,3] ;cons...
分类:编程语言   时间:2015-05-20 01:56:22    阅读次数:152
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!