!SESSION?2013-07-15?13:38:59.893?-----------------------------------------------
eclipse.buildId=4.3.0.I20130605-2000
java.version=1.6.0_51
java.vendor=Apple?Inc.
BootLoader?constants:?OS=ma...
分类:
系统相关 时间:
2015-04-14 13:11:42
阅读次数:
290
题目地址:https://leetcode.com/problems/remove-duplicates-from-sorted-array-ii/题目解析:首先需要一个数组下标用于遍历数组元素;同时在遍历的过程中需要把个数大于2的数字只保留2个,也就是说需要把数组后面的元素往前移,也就是说需要维护...
分类:
其他好文 时间:
2015-04-14 00:41:46
阅读次数:
132
题目:https://leetcode.com/problems/remove-duplicates-from-sorted-array/Given a sorted array, remove the duplicates in place such that each element appea...
分类:
其他好文 时间:
2015-04-14 00:26:32
阅读次数:
176
Exponentiation
Time Limit: 500MS
Memory Limit: 10000K
Total Submissions: 143401
Accepted: 34998
Description
Problems involving the computation of exact values of very...
分类:
其他好文 时间:
2015-04-13 10:59:56
阅读次数:
112
https://leetcode.com/problems/house-robber/
题目设计了一个抢劫犯的情景,其实就是求数组中不相邻数据进行组合得到的最大值
举一个例子
假设数据: 8 3 6 15 4 9 7 10
那么首先可能选取 8 , 3
每一个数字的选取都是根据他的前两个数字,前三个数字得到的最大值进行选择,等到6的时候考虑前面只能和8组合 8,3,14
到数字15,...
分类:
编程语言 时间:
2015-04-13 00:28:01
阅读次数:
164
https://leetcode.com/problems/reverse-bits/
Reverse bits of a given 32 bits unsigned integer.
For example, given input 43261596 (represented in binary as 00000010100101000001111010011100), ret...
分类:
其他好文 时间:
2015-04-13 00:26:40
阅读次数:
143
https://leetcode.com/problems/sudoku-solver/Write a program to solve a Sudoku puzzle by filling the empty cells.Empty cells are indicated by the chara...
分类:
其他好文 时间:
2015-04-12 22:20:39
阅读次数:
128
题目地址:https://leetcode.com/problems/median-of-two-sorted-arrays/题目解析:看到题目的第一个思路是用二分查找,但是深入下去后发现使用二分查找很多边界和细节方面的处理很麻烦,退而求其次,采用分治法。如果两个数组的长度和为偶数,则求两个数组的中...
分类:
其他好文 时间:
2015-04-12 14:37:18
阅读次数:
97
背景: 原问题出处:https://leetcode.com/problems/zigzag-conversion/ 就是将一个字符串按ZigZag格式进行转换,并返回。例如字符串"ABCDEFGHIJK" 转换后(3行): A?E?I
BDFHJ
C?G?K ? 然后按行打印:AEI...
分类:
其他好文 时间:
2015-04-12 00:09:44
阅读次数:
235
https://leetcode.com/problems/n-queens-ii/Follow up for N-Queens problem.Now, instead outputting board configurations, return the total number of dist...
分类:
其他好文 时间:
2015-04-11 22:21:58
阅读次数:
164