码迷,mamicode.com
首页 >  
搜索关键字:problems    ( 6275个结果
LeetCode-Insertion Sort List-链表插入排序-链表操作
https://oj.leetcode.com/problems/insertion-sort-list/插入排序为假设[0,i)已经为有序数组,下一步从[i,n)找最小的元素交换到i处。用指针模拟这个过程即可。就是操作有些麻烦。每次[head,p)为已经有序的数组,下次从[p,tail]找出最小的...
分类:编程语言   时间:2014-10-11 01:46:54    阅读次数:327
[UVA] 11991 - Easy Problem from Rujia Liu? [STL应用]
11991 - Easy Problem from Rujia Liu?Time limit: 1.000 secondsProblem EEasy Problem from Rujia Liu?Though Rujia Liu usually sets hard problems for cont...
分类:其他好文   时间:2014-10-10 22:51:14    阅读次数:239
LeetCode-Next Permutation-下一个排列-扫描+排序(不是最优解)
https://oj.leetcode.com/problems/next-permutation/我这个解法并不很好,是O(n^2),这个在STL实现里应该是O(n)的。不过我的方法比较简单。想法是首先需要找到一个left边界l,这个边界需要跟其后面的某个元素r交换使序列增大。然后在l前面的部分不...
分类:编程语言   时间:2014-10-10 22:39:24    阅读次数:177
[leetcode]Distinct Subsequences @ Python
原题地址:https://oj.leetcode.com/problems/distinct-subsequences/题意:Given a stringSand a stringT, count the number of distinct subsequences ofTinS.A subseq...
分类:编程语言   时间:2014-10-08 00:56:04    阅读次数:262
dp related problems (update continuously)
dynamic programming related problems......
分类:其他好文   时间:2014-10-07 22:58:14    阅读次数:291
[leetcode]Best Time to Buy and Sell Stock III @ Python
原题地址:https://oj.leetcode.com/problems/best-time-to-buy-and-sell-stock-iii/题意:Say you have an array for which theithelement is the price of a given sto...
分类:编程语言   时间:2014-10-06 23:54:02    阅读次数:266
leetcode tree related problems (update continuously)
leetcode 二叉树的层次遍历...
分类:其他好文   时间:2014-10-05 21:35:09    阅读次数:220
ZOJ - 3228 Searching the String (AC自动机)
Description Little jay really hates to deal with string. But moondy likes it very much, and she's so mischievous that she often gives jay some dull problems related to string. And one day, moondy g...
分类:其他好文   时间:2014-10-05 15:19:28    阅读次数:279
LeetCode-Minimum Window Substring-最小窗口子串-滑动窗口算法(尺取法)
https://oj.leetcode.com/problems/minimum-window-substring/线性复杂度的限制下,考虑使用滑动窗口法。这个方法的思路就是维持一个窗口,窗口向右边界扩张以满足限制条件。窗口左边界收缩以尽量使其最小。注意这个题目可能是一个典型的滑动窗口方法的实现。外...
分类:Windows程序   时间:2014-10-04 02:29:05    阅读次数:317
《算法竞赛入门经典——训练指南》第二章题库
UVa特别题库 UVa网站专门为本书设立的分类题库配合,方便读者提交: http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=442 注意,下面注有“extra”的习题并没有在书中出现,但在上面的特别题库中有,属于附加习题。 基础练习 (Basic Problems) ...
分类:其他好文   时间:2014-10-03 09:56:44    阅读次数:259
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!