码迷,mamicode.com
首页 >  
搜索关键字:reverse integer    ( 19410个结果
JAVA自动装箱与拆箱
1、什么是自动装箱基本数据类型的自动装箱(autoboxing)、拆箱(unboxing)是自J2SE 5.0开始提供的功能。一般我们要创建一个类的对象的时候,我们会这样:Class a = new Class(parameter);当我们创建一个Integer对象时,却可以这样:Integer i...
分类:编程语言   时间:2014-06-18 09:35:58    阅读次数:244
LeetCode:Roman to Integer,Integer to Roman
首先简单介绍一下罗马数字,一下摘自维基百科罗马数字共有7个,即I(1)、V(5)、X(10)、L(50)、C(100)、D(500)和M(1000)。按照下述的规则可以表示任意正整数。需要注意的是罗马数字中没有“0”,与进位制无关。一般认为罗马数字只用来记数,而不作演算。重复数次:一个罗马数字重复几...
分类:其他好文   时间:2014-06-18 00:02:25    阅读次数:311
LeetCode:Merge Sorted Array
Given two sorted integer arrays A and B, merge B into A as one sorted array. Note: You may assume that A has enough space (size that is greater or equal to m + n) to hold additional ele...
分类:其他好文   时间:2014-06-17 23:05:13    阅读次数:246
leetcode -day30 Reverse Linked List II
1、 ?? 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....
分类:其他好文   时间:2014-06-17 23:03:12    阅读次数:257
Reverse Nodes in k-Group
题目 Given a linked list, reverse the nodes of a linked list k at a time and return its modified list. If the number of nodes is not a multiple of k then left-out nodes in the end should rem...
分类:其他好文   时间:2014-06-17 22:15:52    阅读次数:299
[LeetCode] Reverse Integer
Reverse digits of an integer.Example1: x = 123, return 321 Example2: x = -123, return -321Have you thought about this?Here are some good questions to ...
分类:其他好文   时间:2014-06-17 20:06:14    阅读次数:205
Roman to Integer
题目 Given a roman numeral, convert it to an integer. Input is guaranteed to be within the range from 1 to 3999. 方法 public int romanToInt(String s) { HashMap hm = new H...
分类:其他好文   时间:2014-06-17 19:27:48    阅读次数:324
Integer to Roman
题目 Given an integer, convert it to a roman numeral. Input is guaranteed to be within the range from 1 to 3999. 方法 /*语法: *(1)基本数字I,X,C中的任何一个连用构成数目,都不能超过三个; *  放在大数的左边只能用一个。  (2)基...
分类:其他好文   时间:2014-06-17 16:33:27    阅读次数:217
Palindrome Number
题目 Determine whether an integer is a palindrome. Do this without extra space. Some hints: Could negative integers be palindromes? (ie, -1) If you are thinking of converting the integer to ...
分类:其他好文   时间:2014-06-17 16:12:39    阅读次数:226
php取整
有3个:floor — 舍去法取整 floor ($value )返回不大于 value 的下一个整数,将 value 的小数部分舍去取整。floor() 返回的类型仍然是 float,因为 float 值的范围通常比 integer 要大。 ceil — 进一法取整ceil ( $value )....
分类:Web程序   时间:2014-06-17 15:08:58    阅读次数:234
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!