Search in Rotated Sorted Array ISuppose a sorted array is rotated at some pivot unknown to you beforehand.(i.e.,0 1 2 4 5 6 7might become4 5 6 7 0 1 2...
分类:
其他好文 时间:
2014-09-22 23:54:43
阅读次数:
271
Given a sorted array and a target value, return the index if the target is found. If not, return the index where it would be if it were inserted in or...
分类:
其他好文 时间:
2014-09-22 22:48:33
阅读次数:
180
1.修改conf/core-site.xml增加 fs.checkpoint.period 3600 The number of seconds between two periodic checkpoints. fs.checkpoint.size 67108864 The size of ...
分类:
其他好文 时间:
2014-09-22 20:25:53
阅读次数:
247
当索引出现问题时,会导致严重的性能问题,索引问题包括索引不可用、索引碎片导致性能下降,我们需要一些手段在检测索引的问题,并解决这些问题。这一篇将为你讲述怎么定位索引问题,并提供了解决的办法。
索引不可用
索引不可用的原因有很多,包括:
1)索引空间耗尽,导致SQL*Loader更新索引失败;
2)创建索引的过程中实例失败;
3)唯一键有重复值;
4)某个索引的顺序与sorted...
分类:
数据库 时间:
2014-09-22 15:19:33
阅读次数:
365
Given a sorted array of integers, find the starting and ending position of a given target value.Your algorithm's runtime complexity must be in the ord...
分类:
其他好文 时间:
2014-09-21 19:36:11
阅读次数:
172
两个方法: 方法1. 利用 STL 中的 multiset (根据结点内的值)自动对指针排序。空间 O(N), 时间 O(NlogN).
方法2. 不利用任何 STL 函数。对指针建堆排序,只需要一个(win32: 4Byte)指针数组即可。空间 : O(K), 时间 O(NlogK)
...
分类:
其他好文 时间:
2014-09-21 17:30:21
阅读次数:
305
Remove Duplicates from Sorted Array IGiven a sorted array, remove the duplicates in place such that each element appear onlyonceand return the new len...
分类:
其他好文 时间:
2014-09-21 14:50:00
阅读次数:
209
https://oj.leetcode.com/problems/combinations/Given two integers n and k, return all possible combinations of k numbers out of 1 ... n.For example,If ...
分类:
编程语言 时间:
2014-09-20 09:58:07
阅读次数:
204
Is it possible to write a swap method in java? these two variables will be primitives.It's not possible, without any objects or arrays. (Java passes s...
分类:
编程语言 时间:
2014-09-20 09:56:07
阅读次数:
176
The gray code is a binary numeral system where two successive values differ in only one bit.Given a non-negative integer n representing the total numb...
分类:
其他好文 时间:
2014-09-20 07:45:26
阅读次数:
195