- 博客(5)
- 收藏
- 关注
原创 关于jdbc 连接MySQL 时遇到的一些问题
一般不注意会报两个错误: 1.mysql java.sql.SQLException: The server time zone value‘XXXXXX’ is unrecognized or represents… 解决此错误需在url后加入&serverTimezone=GMT,GMT%2B8为gtm+8时区的时间; 2.WARN: Establishing SSL conne...
2018-05-02 19:26:15
150
原创 反转正整数
反转整数样例 123 反转之后是 321。 900 反转之后是 9public class Solution { public long reverseInteger(long number) { long re=0; while(number > 0) { re *= 10; re +=...
2018-03-11 14:36:22
794
原创 lintcode 全排列
全排列给定一个数字列表,返回其所有可能的排列。样例给出一个列表[1,2,3],其全排列为:[ [1,2,3], [1,3,2], [2,1,3], [2,3,1], [3,1,2], [3,2,1] ]public class Solution { public List<List<Integer>> p...
2018-03-11 13:47:17
158
原创 lintcode A+B问题
A + B 问题给出两个整数a和b, 求他们的和, 但不能使用 + 等数学运算符。代码public class Solution { public int aplusb(int a, int b) { if(a==0)return b; if(b==0)return a; int x1 = a^b; int x...
2018-03-10 19:46:07
164
原创 lintcode 数组划分问题
数组划分给出一个整数数组 nums 和一个整数 k。划分数组(即移动数组 nums 中的元素),使得:所有小于k的元素移到左边 所有大于等于k的元素移到右边 返回数组划分的位置,即数组中第一个位置 i,满足 nums[i] 大于等于 k。注意事项你应该真正的划分数组 nums,而不仅仅只是计算比 k 小的整数数,如果数组 nums 中的所有元素都比 k 小,则返回 num...
2018-03-10 19:39:43
264
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人