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
从J2SE 5.0开始提供基本数据类型的自己主动装箱(autoboxing)、拆箱(unboxing)功能。何为自己主动装箱:当我们创建一个Integer对象时,却能够这样:Integer i = 100; (注意:不是 int i = 100; )实际上,运行上面那句代码的时候,系统为我们运行了:...
分类:
编程语言 时间:
2015-07-01 21:54:15
阅读次数:
121
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
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链接: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
原题链接: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
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
题目: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
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
样例
如把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