码迷,mamicode.com
首页 >  
搜索关键字:the most fundamental    ( 3981个结果
排序算法总结:一、基数排序
基数排序(Radix sort)是一种非比较型的整数排序算法,其原理是将整数按位数切割成不同的数字,然后按每个位数分别比较。基数排序也分为LSD(Least significant digital)和MSD(Most significant digital)两种方式,LSD的排序方式由键值的最右边开...
分类:编程语言   时间:2015-07-15 18:30:39    阅读次数:212
[LeetCode] Container With Most Water
Well, an interesting problem. If you draw some examples on a white board and try to figure out the regularities, you may have noticed that the key to ...
分类:其他好文   时间:2015-07-14 22:31:07    阅读次数:149
Easiest way to use Qhull library in your code.
Theqhulllibrary has a centralpoint with a few samples to startfrom when you want to use it in your code. Most interestingly, the developers invite you...
分类:其他好文   时间:2015-07-14 20:09:32    阅读次数:202
80 Remove Duplicates from Sorted Array II
80 Remove Duplicates from Sorted Array II链接:https://leetcode.com/problems/remove-duplicates-from-sorted-array-ii/ 问题描述: Follow up for “Remove Duplicates”: What if duplicates are allowed at most twic...
分类:其他好文   时间:2015-07-14 15:37:17    阅读次数:86
hdu5282 最长公共子序列的变形
http://acm.hdu.edu.cn/showproblem.php?pid=5282 Problem Description Xuejiejie loves strings most. In order to win the favor of her, a young man has two strings X, Y to Xuejiejie. Xuejiejie ha...
分类:其他好文   时间:2015-07-14 13:45:05    阅读次数:171
[LeetCode] Longest Substring with At Most Two Distinct Characters
Problem DescriptionGiven a string, find the length of the longest substring T that contains at most 2 distinct characters.For example, Given s =“eceba...
分类:其他好文   时间:2015-07-14 13:20:40    阅读次数:95
POJ 2886 Who Gets the Most Candies?(线段树·约瑟夫环)
题意  n个人顺时针围成一圈玩约瑟夫游戏  每个人手上有一个数val[i]   开始第k个人出队  若val[k] 0 时向左数val[k]个  第m出队的人可以得到m的约数个数个糖果  问得到最多糖果的人是谁 约瑟夫环问题  n比较大 直接模拟会超时   通过线段树可以让每次出队在O(logN)时间内完成  类似上一道插队的题  线段树维护对应区间还有多少个人没出队  那么当我们知道出队的人...
分类:其他好文   时间:2015-07-13 22:34:13    阅读次数:237
virtualenv and virtualenvwrapper on Ubuntu 14.04
In this post I’ll go over my attempt to setup virtual environments for Python development. Most Python users probably don’t want to use virtual enviro...
分类:移动开发   时间:2015-07-13 20:35:38    阅读次数:184
[leedcode 66] Plus One
Given a non-negative number represented as an array of digits, plus one to the number.The digits are stored such that the most significant digit is at...
分类:其他好文   时间:2015-07-13 20:16:45    阅读次数:116
C++实现python标准库中的Counter
看python standard library by exmple里面提到一个Counter容器,它像muliset一样,能够维持一个集合,并在常量时间插入元素、查询某个元素的个数,而且还提供了一个most_common(n)方法,用于统计频数最大的n个元素,这在读取文本并统计词频的时候显得非常实...
分类:编程语言   时间:2015-07-13 18:25:51    阅读次数:152
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!