码迷,mamicode.com
首页 >  
搜索关键字:integer    ( 14932个结果)
Leetcode 202 Happy Number
Write an algorithm to determine if a number is "happy".A happy number is a number defined by the following process: Starting with any positive integer...
分类:移动开发   时间:2015-07-01 15:52:11    阅读次数:136
Number of 1 Bits
https://leetcode.com/problems/number-of-1-bits/Write a function that takes an unsigned integer and returns the number of ’1' bits it has (also known a...
分类:其他好文   时间:2015-07-01 14:08:15    阅读次数:99
小胖学PHP总结1-----PHP的数据类型
PHP一共支持8种原始类型,包括4中标量类型,即:boolean(布尔型)、integer(整形)、float/double(浮点型)和string(字符串型);两种复合类型,即:array(数组)和object(对象);两种特殊类型,即:resource(资源)与NULL。 1.1 标量数据类型    1.1.1 boolean类型       通常布尔类型都是应用在条件或者循环语句的表达...
分类:Web程序   时间:2015-07-01 12:30:47    阅读次数:145
[LintCode] O(1)检测2的幂次
1 class Solution { 2 public: 3 /* 4 * @param n: An integer 5 * @return: True or false 6 */ 7 bool checkPowerOf2(int n) { 8 ...
分类:其他好文   时间:2015-07-01 08:33:17    阅读次数:348
7-1日刷题
Roman to Integer public int romanToInt(String s) { //数字:Ⅰ(1)Ⅴ(5)Ⅹ(10)L(50)C(100)D(500)M(1000) HashMap map = new HashMap(); ma...
分类:其他好文   时间:2015-07-01 00:58:36    阅读次数:206
LeetCode #13 Roman to Integer #Java
问题 Given a roman numeral, convert it to an integer.Input is guaranteed to be within the range from 1 to 3999.Tags: Math, String代码public class Solution { public int romanToInt(String s) { M...
分类:编程语言   时间:2015-06-30 22:08:23    阅读次数:207
Leetcode 228 Summary Ranges
Given a sorted integer array without duplicates, return the summary of its ranges.For example, given[0,1,2,4,5,7], return["0->2","4->5","7"].类似于 Leetc...
分类:其他好文   时间:2015-06-30 21:56:07    阅读次数:103
[LeetCode] Summary Ranges
Given a sorted integer array without duplicates, return the summary of its ranges.For example, given [0,1,2,4,5,7], return ["0->2","4->5","7"].解题思路略实现代码C++:// Runtime: 0 ms class Solution { public:...
分类:其他好文   时间:2015-06-30 20:27:06    阅读次数:124
Mysql Concat()bug
1、http://bugs.mysql.com/bug.php?id=12030 CONCAT with INTEGER modifies result-set encoding 2、这个bug的修改方式, 对integer变量进行转换 CONCAT(p.company,'-',CAST(p.id ...
分类:数据库   时间:2015-06-30 20:16:05    阅读次数:153
练习题 (三)
题目:Summary RangesGiven a sorted integer array without duplicates, return the summary of its ranges.For example, given[0,1,2,4,5,7], return["0->2","4->...
分类:其他好文   时间:2015-06-30 18:10:08    阅读次数:102
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!