码迷,mamicode.com
首页 >  
搜索关键字:longest ordered subs    ( 3212个结果
Longest Consecutive Sequence
[leetcode]Given an unsorted array of integers, find the length of the longest consecutive elements sequence....
分类:其他好文   时间:2014-09-19 12:09:45    阅读次数:167
php实现观察者模式
<meta charset=‘utf-8‘ /> <title>观察者模式</title> <?php class Tongzhi implements SPLSubject { protected $subs = array(); public $username = ‘我是被观察者‘; public ...
分类:Web程序   时间:2014-09-18 23:55:15    阅读次数:398
LeetCode:Longest Substring Without Repeating Characters
Given a string, find the length of the longest substring without repeating characters. For example, the longest substring without repeating letters fo...
分类:其他好文   时间:2014-09-18 14:40:43    阅读次数:208
Longest Palindromic Substring -LeetCode
题目 Given a string s,find the longest palindromic substring in S.You may assume that the maximum length of S is 1000,and there exist one unique longes....
分类:其他好文   时间:2014-09-17 21:46:02    阅读次数:238
longest incresing sequence
动态规划基本题目,longest incresing sequence,找出序列中的最长递增子序列;例如给出序列{8,3,5,2,4,9,7,11},其中最长递增子序列为{3,5,9,11}或{3,5,7,11}或{3,4,9,11}或{3,4,7,11},子序列按元素递增,序列长度都为4;子问题:...
分类:其他好文   时间:2014-09-17 21:36:52    阅读次数:231
Leetcode_num2_Maximum Depth of Binary Tree
题目: Given a binary tree, find its maximum depth. The maximum depth is the number of nodes along the longest path from the root node down to the farthest leaf node. AC率第二高的题啦,二项树的最长路径。初看此题...
分类:其他好文   时间:2014-09-17 20:26:52    阅读次数:162
git tips 积累
统计项目中所有人的代码提交次数并排序:git shortlog -s -n统计某人的代码量git log --author="_Your_Name_Here_" --pretty=tformat: --numstat \| gawk '{ add += $1; subs += $2; loc += ...
分类:其他好文   时间:2014-09-17 14:47:42    阅读次数:180
常见排序算法(冒泡、选择、插入、快速、归并C++实现)
常见排序算法(冒泡、选择、插入、快速、归并C++实现) #include using namespace std; // 冒泡排序 void bubbleSort (int data[], size_t size) { for (size_t i = 0; i < size - 1; ++i) { bool ordered = true; for (size_t j = 0; j <...
分类:编程语言   时间:2014-09-16 22:09:41    阅读次数:272
LeetCode Maximum Depth of Binary Tree
Given a binary tree, find its maximum depth.The maximum depth is the number of nodes along the longest path from the root node down to the farthest le...
分类:其他好文   时间:2014-09-16 00:15:49    阅读次数:196
最长公共子串
最长公共子串(Longest Common Substring)是一个非常经典的问题,它的基本描述为“给定两个字符串,求出它们之间最长的相同子字符串(要求连续)的长度”。求N个最长为L的字符串的的LCS的方法大致可分为以下几类:1.枚举法显然是简单但极端低效的算法,改进一些的算法是用一个串的每个后缀对其他所有串进行部分匹配,用KMP算法,时间复杂度为O(NL2)。2.动态规划解法:平方的时间算法。3.后缀数组与高度数组解法,利用二分查找技术,时间复杂度为O(NLlogL)。3.广义后缀树方法,时间复杂度为可...
分类:其他好文   时间:2014-09-15 21:22:49    阅读次数:389
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!