循环有序 一共有以下两种情况 第一种 / / // / / 条件:(A[mid] >= A[low]) ,low~mid 二分,mid~high 递归第二种 / / / / / / 条件:(A[mid] A[mid])12 ...
分类:
其他好文 时间:
2014-06-19 06:46:36
阅读次数:
303
二叉查找树(Binary Search Tree),也称二叉排序树(binary sorted tree),是指一棵空树或者具有下列性质的二叉树:若任意节点的左子树不空,则左子树上所有结点的值均小于它的根结点的值任意节点的右子树不空,则右子树上所有结点的值均大于它的根结点的值任意节点的左、右子树也分...
分类:
其他好文 时间:
2014-06-16 23:32:04
阅读次数:
199
没什么太多讲的,可以使用递归和迭代两种方法来做,要仔细考虑各种输入情况。code如下:...
分类:
其他好文 时间:
2014-06-15 15:09:59
阅读次数:
145
Write an efficient algorithm that searches for a value in an m x n matrix. This matrix has the following properties:
Integers in each row are sorted from left to right.The first integer of each...
分类:
其他好文 时间:
2014-06-15 14:12:44
阅读次数:
238
题目
Given two integers n and k, return all possible combinations of k numbers out of 1 ... n.
For example,
If n = 4 and k = 2, a solution is:
[
[2,4],
[3,4],
[2,3],
[1,2],
[1,3],...
分类:
其他好文 时间:
2014-06-15 14:10:54
阅读次数:
239
Problem Description
In a factory, there are N workers to finish two types of tasks (A and B). Each type has N tasks. Each task of type A needs xi time to finish, and each task of type B needs yj ti...
分类:
其他好文 时间:
2014-06-15 11:26:42
阅读次数:
195
Given a sorted array, remove the duplicates in place such that each element appear only onceand return the new length.Do not allocate extra space for ...
分类:
其他好文 时间:
2014-06-14 16:59:58
阅读次数:
221
Follow up for ”Remove Duplicates”: What if duplicates are allowed at most twice?For example, Given sorted array A = [1,1,1,2,2,3],Your function should...
分类:
其他好文 时间:
2014-06-14 16:08:32
阅读次数:
200
题目
Follow up for "Search in Rotated Sorted Array":
What if duplicates are allowed?
Would this affect the run-time complexity? How and why?
Write a function to determine if a given target is in the array.
原题链接(点我)
解题思路
这题和Search in Rotated Sorted Array问题类似,...
分类:
其他好文 时间:
2014-06-14 12:44:18
阅读次数:
266
在11g 安装过程中默认只能指定一个 dg 用来存储:crs ,voting
但是oracle 官方一般建议我们这么来配置:
■
1、当ocr没有配置镜像,或者冗余存储时 最少3个ocr 。
如果底层存储不是RAID的话,oracle建议镜像OCR,镜像可以避免单点故障。
■ At least two OCR locations if OCR is configured on...
分类:
数据库 时间:
2014-06-14 12:29:52
阅读次数:
447