码迷,mamicode.com
首页 >  
搜索关键字:integer    ( 14932个结果)
[LeetCode] Power of Two
Given an integer, write a function to determine if it is a power of two.判断一个数是不是2的幂。思路,找出该数中二进制位1的个数 public boolean isPowerOfTwo(int n) { if...
分类:其他好文   时间:2015-07-12 17:10:52    阅读次数:85
[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"].思路:采用双指针 ...
分类:其他好文   时间:2015-07-12 17:07:47    阅读次数:161
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"].class Sol...
分类:其他好文   时间:2015-07-12 15:35:54    阅读次数:100
Power of Two
Given an integer, write a function to determine if it is a power of two.//初始理解为把数字拆分为两个整数的乘积。。。英语差真操蛋C++:class Solution {public: bool isPowerOfTwo(...
分类:其他好文   时间:2015-07-12 14:07:19    阅读次数:63
Oracle-数据实现竖排打印
--存放重证评分的数据表create table ZZPFapache2( ZZ_datetime DATE, --时间 ZZ_zongfen INTEGER, --总分 ZZ_shiwanglui INTEGER, --死亡率 ZZ_BINGRENID VARCHAR2(50), --病人ID ....
分类:数据库   时间:2015-07-12 10:58:42    阅读次数:264
Happy Number -- leetcode
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, replace the number by the sum of the squares...
分类:移动开发   时间:2015-07-12 09:44:45    阅读次数:117
POJ 1503 Integer Inquiry 大数 难度:0
题目链接:http://poj.org/problem?id=1503 1 import java.io.*; 2 import java.math.BigInteger; 3 import java.util.Scanner; 4 5 public class Main { 6 pub...
分类:其他好文   时间:2015-07-12 01:47:06    阅读次数:170
BNUOJ 4049 四叉树
四叉树Time Limit: 1000msMemory Limit: 65536KB64-bit integer IO format:%lld Java class name:Main四叉树是一种常用的数据结构,广泛应用于栅格数据(如地图数据、遥感图像)的压缩编码中。将四叉树扩展到三维就形成了八叉树...
分类:其他好文   时间:2015-07-12 00:15:38    阅读次数:234
[LintCode] 寻找缺失的数
1 class Solution { 2 public: 3 /** 4 * @param nums: a vector of integers 5 * @return: an integer 6 */ 7 int findMissing(ve...
分类:其他好文   时间:2015-07-11 22:38:33    阅读次数:172
Java Day14 泛型
//为什么要使用泛型 //1.解决元素存储的安全性的问题 //2.解决获取元素时,需要类型转换的问题 //Exception in thread "main" java.lang.ClassCastException: java.lang.String cannot be cast to java.lang.Integer package org.tizen.test;...
分类:编程语言   时间:2015-07-11 16:51:22    阅读次数:140
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!