码迷,mamicode.com
首页 >  
搜索关键字:median of two sorted    ( 17004个结果
[LeetCode] Search in Rotated Sorted Array
循环有序 一共有以下两种情况 第一种 / / // / / 条件:(A[mid] >= A[low]) ,low~mid 二分,mid~high 递归第二种 / / / / / / 条件:(A[mid] A[mid])12 ...
分类:其他好文   时间:2014-06-19 06:46:36    阅读次数:303
二叉查找树(binary search tree)详解
二叉查找树(Binary Search Tree),也称二叉排序树(binary sorted tree),是指一棵空树或者具有下列性质的二叉树:若任意节点的左子树不空,则左子树上所有结点的值均小于它的根结点的值任意节点的右子树不空,则右子树上所有结点的值均大于它的根结点的值任意节点的左、右子树也分...
分类:其他好文   时间:2014-06-16 23:32:04    阅读次数:199
leetcode——Remove Duplicates from Sorted List II 删除排序字符串中重复字符(AC)
没什么太多讲的,可以使用递归和迭代两种方法来做,要仔细考虑各种输入情况。code如下:...
分类:其他好文   时间:2014-06-15 15:09:59    阅读次数:145
【Leetcode】Search a 2D Matrix
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
[LeetCode] Combinations [38]
题目 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
HDU 1661 Assigments 贪心法题解
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
[LeetCode] Remove Duplicates from Sorted Array
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
[LeetCode] Remove Duplicates from Sorted Array II
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
[LeetCode] Search in Rotated Sorted Array II [36]
题目 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
oracle 11g ocr 冗余配置
在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
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!