码迷,mamicode.com
首页 >  
搜索关键字:merge two sorted lis    ( 37279个结果
CareerCup之1.8 字符串移位包含问题
【题目】 原文: 1.8 Assume you have a method isSubstring which checks if one word is a substring of another. Given two strings, s1 and s2, write code to check if s2 is a rotation of s1 using only one...
分类:其他好文   时间:2014-05-16 01:50:08    阅读次数:311
LeetCode 011 Container With Most Water
【题目】 Given n non-negative integers a1, a2, ..., an, where each represents a point at coordinate (i, ai). n vertical lines are drawn such that the two endpoints of line i is at (i, ai) and (i, 0). Find two lines, which together with x-axis forms a contain...
分类:其他好文   时间:2014-05-16 01:32:47    阅读次数:406
2003-view-Animation-push
介绍ViewFlipper ViewFlipper Simple ViewAnimator that will animate between two or more views that have been added to it. Only one child is shown at a time. If requested, can automatically flip betwee...
分类:其他好文   时间:2014-05-15 18:37:44    阅读次数:356
oracle表之间的连接之------>排序合并连接(Merge Sort Join)
oracle表之间的连接之排序合并连接(Merge Sort Join),其特点如下: 1,驱动表和被驱动表都是最多只被访问一次。 2,排序合并连接的表无驱动顺序。 3,排序合并连接的表需要排序,用到SORT_AREA_SIZE。 4,排序合并连接不适用于的连接条件是:不等于其中大于>,小于 5,排序合并连接,如果有索引就可以排除排序。 下面我来做个实验来证实如上的结论:...
分类:数据库   时间:2014-05-15 18:12:38    阅读次数:386
[LeetCode] [Add Binary 2012-04-02 ]
Given two binary strings, return their sum (also a binary string).For example, a = "11" b = "1" Return "100".string 的操作,短string补位。两个“0”会输出一个“00”,要特殊处理...
分类:其他好文   时间:2014-05-15 17:47:57    阅读次数:283
Leetcode 线性表 数 Add Two Numbers
题意:给定两个代表数字的链表,每个节点里存放一个digit,数字是逆方向的,将这两个链表相加起来 思路: 1.i, j遍历l1,l2至最长,短的补零 2..设置一个进位变量c, 第i次遍历 l1,l2,c的和除以10进位,mod10留在这一位 3.出循环后还要检查是不是还有进位 复杂度:O(m+n), 空间O(m+n)...
分类:其他好文   时间:2014-05-15 13:38:03    阅读次数:258
leetcode第一刷_Median of Two Sorted Arrays
这道题是我最初刷的那20多道之一,但一直没有过,被各种各样的情况折磨死了,直到把所有其他的题都写完,回来看大神对这道题是怎么处理的时候,才惊叹算法的奇妙。再次验证了我的想法,如果要处理各种各样的特殊情况,一定是算法本身有问题。 之前看过很多有关在两个排序数组中找中位数的解法,大多根据两个数组长度不同分了很多种情况,各种讨论。下面要介绍的方法并没有直接求中位数,而是把求中位数转换成了求两个数组合并...
分类:其他好文   时间:2014-05-15 12:21:05    阅读次数:273
MySQL存储引擎简介
MySQL使用的是插件式存储引擎。 主要包括存储引擎有:MyISAM,Innodb,NDB Cluster,Maria,Falcon,Memory,Archive,Merge,Federated。 其中最为广泛的是MyISAM 和Innodb两种存储引擎,所以接下来对它们做简单介绍。 MyISAM 存储引擎简介 MyISAM 存储引擎的表存储在数据库中,每一个表都被存放为三个以表名命名的物理文件。 1、(.frm文件)任何存储引擎都不可缺少的存放表结构定义信息的文件 2、(.MYD文件)存放表数据的文件 ...
分类:数据库   时间:2014-05-15 12:06:07    阅读次数:335
LeetCode Search in Rotated Sorted Array II
class Solution {public: bool search(int A[], int n, int target) { if (n A[mid]) { right = mid; sep = A[mid]; ...
分类:其他好文   时间:2014-05-15 09:29:52    阅读次数:177
Perforce 使用笔记
Perforce requires at least two executables: the server (p4d), and at least one Perforce client program (such as p4 on UNIX, or p4.exe on Windows).If y...
分类:其他好文   时间:2014-05-15 07:51:28    阅读次数:276
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!