码迷,mamicode.com
首页 >  
搜索关键字:integer    ( 14932个结果)
【LeetCode 229】Majority Element II
Given an integer array of sizen, find all elements that appear more than? n/3 ?times. The algorithm should run in linear time and in O(1) space.思路: 【....
分类:其他好文   时间:2015-07-01 22:04:10    阅读次数:129
java自己主动打开包装盒很容易导致两个误区
从J2SE 5.0开始提供基本数据类型的自己主动装箱(autoboxing)、拆箱(unboxing)功能。何为自己主动装箱:当我们创建一个Integer对象时,却能够这样:Integer i = 100; (注意:不是 int i = 100; )实际上,运行上面那句代码的时候,系统为我们运行了:...
分类:编程语言   时间:2015-07-01 21:54:15    阅读次数:121
Majority Element II
https://leetcode.com/problems/majority-element-ii/Given an integer array of sizen, find all elements that appear more than? n/3 ?times. The algorithm ...
分类:其他好文   时间:2015-07-01 21:54:09    阅读次数:138
MySQL PLSQL Demo - 003.静态游标
drop procedure if exists p_hello_world;create procedure p_hello_world()begin declare id integer; declare username varchar(256); declare resul...
分类:数据库   时间:2015-07-01 20:28:27    阅读次数:168
9 Palindrome Number
9 Palindrome Number链接:https://leetcode.com/problems/palindrome-number/ 问题描述: Determine whether an integer is a palindrome. Do this without extra space.click to show spoilers.Some hints: Could negat...
分类:其他好文   时间:2015-07-01 18:26:10    阅读次数:111
Reverse Integer
原题链接:https://leetcode.com/problems/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...
分类:其他好文   时间:2015-07-01 18:22:57    阅读次数:132
[Leetcode]-Palindrome Number
Determine whether an integer is a palindrome. Do this without extra space. 题目:判断int数据是否为回文数 注意:负数不是回文数,0是最小的回文数 思路:此题和前面一道 求int数的反序差不多http://blog.csdn.net/xiabodan/article/details/46674133...
分类:其他好文   时间:2015-07-01 18:22:52    阅读次数:154
Merge Sorted Array
题目:Given two sorted integer arraysnums1andnums2, mergenums2intonums1as one sorted array.Note:You may assume thatnums1has enough space (size that is gr...
分类:其他好文   时间:2015-07-01 17:35:57    阅读次数:125
mysql 存储过程事务
1 DECLARE t_error INTEGER DEFAULT 0; 2 DECLARE CONTINUE HANDLER FOR SQLEXCEPTION SET t_error=1; 3 START TRANSACTION; 7 d...
分类:数据库   时间:2015-07-01 17:34:03    阅读次数:178
Lintcode 将整数A转换为B
样例 如把31转换为14,需要改变2个bit位。 (31)10=(11111)2 (14)10=(01110)2 贴代码 class Solution { public: /** *@param a, b: Two integer *return: An integer */ int bitSwapRequired(int a, int ...
分类:其他好文   时间:2015-07-01 16:01:16    阅读次数:266
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!