码迷,mamicode.com
首页 >  
搜索关键字:排序 python    ( 180003个结果)
[leetcode]Minimum Window Substring @ Python
原题地址:https://oj.leetcode.com/problems/minimum-window-substring/题意:Given a string S and a string T, find the minimum window in S which will contain all...
分类:编程语言   时间:2014-06-15 22:10:42    阅读次数:1109
[leetcode]Merge Two Sorted Lists @ Python
原题地址:https://oj.leetcode.com/problems/merge-two-sorted-lists/题意:Merge two sorted linked lists and return it as a new list. The new list should be made...
分类:编程语言   时间:2014-06-15 21:58:31    阅读次数:238
C# Dictionary 的几种遍历方法,排序
Dictionary list = new Dictionary(); list.Add("d", 1); //3.0以上版本 foreach (var item in list) { ...
分类:其他好文   时间:2014-06-15 21:54:38    阅读次数:248
PYTHON对文件及文件夹的一些操作
python中对文件、文件夹的操作需要涉及到os模块和shutil模块。 创建文件: 1) os.mknod("test.txt") 创建空文件 2) open("test.txt",w) 直接打开一个文件,如果文件不存在则创建文件 创建目录: os.mkdir("file") 创建目录 复制文件....
分类:编程语言   时间:2014-06-15 21:53:58    阅读次数:247
[leetcode]Permutation Sequence @ Python
原题地址:https://oj.leetcode.com/submissions/detail/5341904/题意:The set[1,2,3,…,n]contains a total ofn! unique permutations.By listing and labeling all of ...
分类:编程语言   时间:2014-06-15 21:33:16    阅读次数:270
mysql 自定义排序顺序
mysql 自定义排序顺序实例如:在sql语句中加入ORDER BY FIELD(status,3,4,0,2,1)语句可定义排序顺序SELECT tsdvoucher0_.VOUCHER_ID AS VOUCHER1_0_, tsdvoucher0_.COMMENT_DEVICE_TYPE AS ...
分类:数据库   时间:2014-06-15 21:32:00    阅读次数:260
堆排序
堆排序(heapsort)是一种原地(in place)排序算法, 它的时间复杂度是O(nlgn). 堆数据结构不只是在堆排序中有用,它还可以构成一个有效的优先队列。堆数据结构是一种数组对象,它可以被视为一颗完全二叉树。如图: Aheap-size是放在A中堆的元素个数。根据数组节点的索引,我们.....
分类:其他好文   时间:2014-06-15 21:27:58    阅读次数:239
[leetcode]Reverse Nodes in k-Group @ Python
原题地址:https://oj.leetcode.com/problems/reverse-nodes-in-k-group/题意:Given a linked list, reverse the nodes of a linked listkat a time and return its mod...
分类:编程语言   时间:2014-06-15 21:24:43    阅读次数:293
【Algorithm】选择排序
一. 算法描述 选择排序:比如在一个长度为N的无序数组中,在第一趟遍历N个数据,找出其中最小的数值与第一个元素交换,第二趟遍历剩下的N-1个数据,找出其中最小的数值与第二个元素交换......第N-1趟遍历剩下的2个数据,找出其中最小的数值与第N-1个元素交换,至此选择排序完成。 举个例子:5 .....
分类:其他好文   时间:2014-06-15 21:21:56    阅读次数:169
【美妙的Python之二】Python初步
美妙的Python之Python起步 简而言之:Python 是能你无限惊喜的语言,与众不同。 1.动态类型: Python是一种动态类型语言,不须要预先声明变量的类型,变量的类型和值在赋值那一刻动态地初始化。这一点与C/C++,Java等静态类型语言全然不同,静态类型在编译阶段就...
分类:编程语言   时间:2014-06-15 20:18:35    阅读次数:239
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!