Given a roman numeral, convert it to an integer.Input is guaranteed to be within the range from 1 to 3999. 1 public class Solution { 2 public int ...
分类:
其他好文 时间:
2014-08-05 11:02:09
阅读次数:
242
public class RuntimeExceptionDemo01 { public static void main(String[] args) { String string="123"; int temp=Integer.parseInt(string); System.out.prin...
分类:
其他好文 时间:
2014-08-05 11:01:09
阅读次数:
203
Evaluate Reverse Polish NotationEvaluate the value of an arithmetic expression inReverse Polish Notation.Valid operators are+,-,*,/. Each operand may ...
分类:
其他好文 时间:
2014-08-05 10:57:19
阅读次数:
184
The Child and HomeworkTime Limit: 1000msMemory Limit: 262144KBThis problem will be judged onCodeForces. Original ID:437A64-bit integer IO format:%I64d...
分类:
其他好文 时间:
2014-08-05 10:50:09
阅读次数:
321
String?str1?=?"123456789";
??str1?=?new?StringBuilder(str1).reverse().toString();?????//先将字符串颠倒顺序
??String?str2?=?"";
??for(int?i=0;i<str1.length();i++){
??...
分类:
编程语言 时间:
2014-08-05 09:44:49
阅读次数:
232
Party All the TimeTime Limit: 2000msMemory Limit: 32768KBThis problem will be judged onHDU. Original ID:435564-bit integer IO format:%I64d Java class ...
分类:
其他好文 时间:
2014-08-05 09:34:18
阅读次数:
280
题目原文:
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 ...
分类:
其他好文 时间:
2014-08-05 00:51:58
阅读次数:
257
F - Sequence
Time Limit:6000MS Memory Limit:65536KB 64bit IO Format:%I64d
& %I64u
Submit Status
Description
Given m sequences, each contains n non-negative integer. Now we ma...
分类:
其他好文 时间:
2014-08-05 00:51:18
阅读次数:
284
Dancing LessonsTime Limit: 5000msMemory Limit: 262144KBThis problem will be judged onCodeForces. Original ID:45C64-bit integer IO format:%I64d Java cl...
分类:
其他好文 时间:
2014-08-04 21:01:07
阅读次数:
294
题目:存在一个单链表,头指针为head,实现单链表的反转Node *Reverse(Node *head)。
该算法的求解办法有很多,如:
方法1:先顺序变量单链表,将结点保存到栈中,在从栈中弹出结点,重新建立一个新的单链表;
方法2:用《剑指offer》里面给出的算法,用三个指针来实现;
方法3:采用递归实现,是方法2的递归实现形式。
本文主要给出方法2和方法3,在给出具体的代码之前,先要注意几个问题:
...
分类:
其他好文 时间:
2014-08-04 18:01:57
阅读次数:
200