码迷,mamicode.com
首页 >  
搜索关键字:reverse integer    ( 19410个结果
字符串逆向输出
1、思路:将字符串转化为字符串数组,然后根据下标反向输出 public?void?reverse()?{ String?s?=?"hello"; char[]?c; c?=?s.toCharArray();??//转化为字符串数组 for?(int?i?=?c.length?...
分类:其他好文   时间:2014-07-22 09:10:36    阅读次数:446
poj 2046&&poj1961KMP 前缀数组
Power StringsTime Limit: 3000 MS Memory Limit: 65536 KB64-bit integer IO format: %I64d , %I64u Java class name: Main[Submit] [Status] [Discuss]Descrip...
分类:其他好文   时间:2014-07-22 09:00:03    阅读次数:256
java.util.concurrent.AtomicInteger
AtomicInteger,一个提供原子操作的Integer的类。在Java语言中,++i和i++操作并不是线程安全的,在使用的时候,不可避免的会用到synchronized关键字。而AtomicInteger则通过一种线程安全的加减操作接口。 来看Ato...
分类:编程语言   时间:2014-07-22 08:10:35    阅读次数:196
【leetcode刷题笔记】Roman to Integer
Given a roman numeral, convert it to an integer.Input is guaranteed to be within the range from 1 to 3999.题解:转换的方法:从左往右扫描罗马字符,如果当前的字符对应的数字比上一个数字小,就直接加...
分类:其他好文   时间:2014-07-21 10:05:42    阅读次数:223
【leetcode刷题笔记】Integer to Roman
Given an integer, convert it to a roman numeral.Input is guaranteed to be within the range from 1 to 3999.题解:基本的罗马字符和数字对应如下表所示:罗马字符数字I1V5X10L50C100D50...
分类:其他好文   时间:2014-07-21 10:05:16    阅读次数:286
ZOJ1204——Additive equations(DFS)
Additive equationsDescription We all understand that an integer set is a collection of distinct integers. Now the question is: given an integer set...
分类:其他好文   时间:2014-07-21 09:35:45    阅读次数:293
【leetcode刷题笔记】String to Integer (atoi)
Implementatoito convert a string to an integer.Hint:Carefully consider all possible input cases. If you want a challenge, please do not see below and ...
分类:其他好文   时间:2014-07-21 08:36:32    阅读次数:208
swift 值类型和引用类型
值类型值类型被赋予给一个变量,常数或者本身被传递给一个函数的时候,实际上操作的是其的拷贝。在 Swift 中,所有的基本类型:整数(Integer)、浮点数(floating-point)、布尔值(Booleans)、字符串(string)、数组(array)和字典(dictionaries),都是...
分类:其他好文   时间:2014-07-21 00:01:41    阅读次数:255
【LeetCode】【Python题解】Reverse Integer
Reverse digits of an integer. Example1: x = 123, return 321 Example2: x = -123, return -321 click to show spoilers. Have you thought about this? Here are some good questions to ask before c...
分类:编程语言   时间:2014-07-20 22:12:03    阅读次数:251
【leetcode刷题笔记】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 ...
分类:其他好文   时间:2014-07-20 21:32:55    阅读次数:250
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!