码迷,mamicode.com
首页 >  
搜索关键字:排序 python    ( 180003个结果)
[leetcode]Longest Substring Without Repeating Characters @ Python
原题地址:https://oj.leetcode.com/problems/longest-substring-without-repeating-characters/题意:Given a string, find the length of the longest substring witho...
分类:编程语言   时间:2014-06-15 19:51:00    阅读次数:254
学习Python编程的11个资源
转自:http://news.cnblogs.com/n/210346/1.笨办法学 Pythonhttp://learnpythonthehardway.org/book/有各种练习题你将会会学到:在所有的平台上安装 Python 编程环境写 Python 程序理解 Python 语法和文档像一个...
分类:编程语言   时间:2014-06-15 18:10:32    阅读次数:394
排序算法
1.选择排序// 选择排序 每次扫描找出最小的那个,放到正确的位置。 public static int [] sort1(int [] data) { if(data == null) { return null; } in...
分类:其他好文   时间:2014-06-15 16:25:51    阅读次数:188
Python中关于try...finally的一些疑问
最近看Vamei的Python文章,其中一篇讲异常处理的,原本看完没啥疑惑,或许是自己想的简单了。看到评论,一个园友的问题引起我的兴趣。他的问题是def func(x): try: return ++x finally: return x+1print fun...
分类:编程语言   时间:2014-06-15 06:47:20    阅读次数:228
JS数组去重,js中数组(Array)的排序(sort)
JS数组去重var ddd = [1,2,4,5,2, 222,1,5,6];var uq = {};var rq = [];for(var i=0; ib?1:-1});//从小到大排序 alert(arrDemo);//10,50,51,100 arrDemo.sort(function(a,b...
分类:Web程序   时间:2014-06-15 06:28:54    阅读次数:286
关于在Python的注释不能用中文
在用中文进行注释的之后运行会有这样的提示:在文件头加上 #coding=utf-8这一行就可以用中文注释了
分类:编程语言   时间:2014-06-15 06:07:16    阅读次数:310
排序算法总结
概述:排序算法可分为比较性的排序,以及运算性的排序;这里详细介绍这些排序的原理,性能,实现,以及应用场合。比较排序一:快速排序1:原理采用了分治思想,在序列A[p...r]中选取一个元素,当然这里是用了p或者r处的元素(规格一致);找到该元素的,满足前面的值都比它小,后面的都比它大;同理让子序列递归...
分类:其他好文   时间:2014-06-15 00:41:48    阅读次数:297
[leetcode]Add Two Numbers @ Python
原题地址:https://oj.leetcode.com/problems/add-two-numbers/题意:You are given two linked lists representing two non-negative numbers. The digits are stored i...
分类:编程语言   时间:2014-06-15 00:40:44    阅读次数:328
爬虫--用cookie访问任意网页
#!/usr/bin/env python# -*- coding: utf-8 -*-############################################## File : requestAnyURLWithCookie.py# Author : luc...
分类:Web程序   时间:2014-06-15 00:33:30    阅读次数:187
python getattr()
About getattrPython’s getattr function is used to fetch an attribute from an object, using a string object instead of an identifier to identify the at...
分类:编程语言   时间:2014-06-15 00:26:18    阅读次数:487
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!