码迷,mamicode.com
首页 >  
搜索关键字:reverse integer    ( 19410个结果
1061 快速幂取模
HDU 1061 Rightmost Digit分类: ACM 算法 2011-12-17 17:37 749人阅读 评论(2) 收藏 举报integeroutputinputeach算法c Problem DescriptionGiven a positive integer N, you sh....
分类:其他好文   时间:2014-05-09 10:20:14    阅读次数:243
Leetcode: Roman to Integer, Integer to Roman
Roman to IntegerInteger to Roman这两题纯粹是模拟题,关键就是理解罗马计数,直接上代码吧class Solution {public: int romanToInt(string s) { int result = 0; for (...
分类:其他好文   时间:2014-05-09 09:46:36    阅读次数:298
把x指针指向的4个字节次序颠倒过来
举例:x指向的内存地址,其字节内容从低到高依次分别为c1,c2,c3,c4(Delphi读取一个integer的时候,结果是c4c3c2c1,其排列规则是"高高低低"),那么结果是c4,c3,c2,c1(Delphi读取一个integer的时候,结果是c1c2c3c4)用delphi写的程序,把x指...
分类:其他好文   时间:2014-05-09 05:41:08    阅读次数:329
Edit Distance @Leetcode -- Python
http://oj.leetcode.com/problems/edit-distance/class Solution: # @return an integer def minDistance(self, word1, word2): len1 = len(word1)...
分类:编程语言   时间:2014-05-09 04:19:03    阅读次数:407
【转】MYSQL入门学习之四:MYSQL的数据类型
转载地址:http://www.2cto.com/database/201212/175536.html一、整型 www.2cto.com 整数类型是数据库中最基本的数据类型。标准SQL中支持INTEGER和SMALLINT这两种整数类型。MySQL数据库除了支持这两种类型外,还扩展支持了T...
分类:数据库   时间:2014-05-09 00:19:56    阅读次数:516
Longest Valid Parentheses @Leetcode -- Python
http://oj.leetcode.com/problems/longest-valid-parentheses/ 1 class Solution: 2 # @param s, a string 3 # @return an integer 4 def longestVa...
分类:编程语言   时间:2014-05-09 00:11:38    阅读次数:410
Objective C 代码片段(类别)
1 @interface NSString (reverse)2 3 -(NSString *) reverseString;4 5 @end 1 @implementation NSString (reverse) 2 3 -(NSString *) reverseString { 4 ...
分类:其他好文   时间:2014-05-08 23:54:31    阅读次数:438
java边界问题
可以看到程序执行不完原因:i的值在变到Integer.MAXVALUE再加1是编程int的最小值永远小于最大值死循环
分类:编程语言   时间:2014-05-08 16:33:01    阅读次数:379
Leetcode: Roman to Integer
一次通过: 1 public class Solution { 2 public int romanToInt(String s) { 3 int sum = 0; 4 int[] num = new int[s.length()]; 5 if...
分类:其他好文   时间:2014-05-08 08:24:26    阅读次数:233
Leetcode: String to Integer
抠细节的题目,很多次过,特别是 Integer.MIN_VALUE 与 Integer.MAX_VALUE的绝对值并不一样大 1 public class Solution { 2 public int atoi(String str) { 3 int result=0; 4...
分类:其他好文   时间:2014-05-08 05:44:17    阅读次数:343
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!