码迷,mamicode.com
首页 >  
搜索关键字:排序 python    ( 180003个结果)
快速排序结合插入排序
继上一篇堆排序之后,用相同的数据结构写了个快速排序和插入排序,当数组的长度较小的时候,可使用插入排序,实现如下:QuickSort.h 1 #ifndef __QUICKSORT 2 #define __QUICKSORT 3 #include "MySqList.h" 4 #include "In...
分类:其他好文   时间:2014-06-06 10:50:30    阅读次数:282
Python读文件
Linux上用Python实现对文件的读取
分类:编程语言   时间:2014-06-06 10:01:46    阅读次数:261
[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-06-06 09:59:43    阅读次数:330
各种搜索路径问题
python中import一个模块时python解释器的搜索目录顺序:参考python帮助文档The Module Search PathWhen a module namedspamis imported, the interpreter first searches for a built-in...
分类:其他好文   时间:2014-06-06 09:45:30    阅读次数:250
二分法插入排序
二分法插入排序算法思想简单描写叙述:在插入第i个元素时,对前面的0~i-1元素进行折半,先跟他们中间的那个元素比,假设小,则对前半再进行折半,否则对后半进行折半,直到left>right,然后再把第i个元素前1位与目标位置之间的全部元素后移,再把第i个元素放在目标位置上。二分法没有排序,仅仅有查找。...
分类:其他好文   时间:2014-06-06 09:20:35    阅读次数:224
mysql中group by和order by混用 结果不是理想结果
在使用mysql排序的时候会想到按照降序分组来获得一组数据,而使用order by往往得到的不是理想中的结果,那么怎么才能使用group by 和order by得到理想中的数据结果呢?例如有一个 帖子的回复表,posts( id , tid , subject , message , dateli...
分类:数据库   时间:2014-06-06 08:17:08    阅读次数:311
归并排序算法
import static org.junit.Assert.*;import java.util.Arrays;import org.junit.Test;public class SortAlgorithms { /** * 归并排序算法 * * @param a * @return */ st...
分类:其他好文   时间:2014-06-06 07:26:53    阅读次数:273
[leetcode]Interleaving String @ Python
原题地址:https://oj.leetcode.com/problems/interleaving-string/题意:Givens1,s2,s3, find whethers3is formed by the interleaving ofs1ands2.For example,Given:s1...
分类:编程语言   时间:2014-06-06 07:26:08    阅读次数:351
插入排序算法
import static org.junit.Assert.*;import java.util.Arrays;import org.junit.Test;public class SortAlgorithms { /** * 插入排序算法 * * @param n...
分类:其他好文   时间:2014-06-06 07:07:40    阅读次数:205
[服务器]WAMP介绍
Windows下的Apache+Mysql+Perl/PHP/Python,一组常用来搭建动态网站或者服务器的开源软件,本身都是各自独立的程序,但是因为常被放在一起使用,拥有了越来越高的兼容度,共同组成了一个强大的Web应用程序平台。随着开源潮流的蓬勃发展,开放源代码的LAMP已经与J2EE和.Ne...
分类:其他好文   时间:2014-06-06 06:42:57    阅读次数:525
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!