码迷,mamicode.com
首页 >  
搜索关键字:排序 python    ( 180003个结果)
使用字符串
1.字符串格式化使用字符串格式化操作符,即百分号%来实现。2.在%的左侧放置一个字符串(格式化字符串),而右则放置希望格式化的值。3.格式化字符串的%s部分称为转换说明符,它们标记了需要插入转换值的位置。S表示值会被格式化为字符串-如果不是字符串,则会用str将其转换为字..
分类:其他好文   时间:2014-06-10 22:20:02    阅读次数:283
[Python]socket使用
python socket可以实现socket通信功能,还可以与php, js等程序进行socket通信,达到在网页中嵌入Python程序的目的。 Python中使用socket模块完成socket通信功能,其提供底层的套接字访问接口。 项目中,Python通过socket与前端js通信,读入数据,处理后传回。...
分类:编程语言   时间:2014-06-10 19:21:09    阅读次数:312
python监控linux性能以及进程消耗的性能
python监控linux性能以及进程消耗的性能...
分类:编程语言   时间:2014-06-10 18:44:54    阅读次数:371
Python 摄像头截图
先容哥叹息一句,此奥~,这什么g8情况,没头脑的装了将近3g的OpenCV,结果没啥用。。。 入题!!环境为Python2.7 严格按照一下步骤操作,必成功: 所需软件如下: VideoCapture:  http://videocapture.sourceforge.net/VideoCapture-0.9-5.zip MyEclipse 插件PyDev: http://ncu.d...
分类:编程语言   时间:2014-06-10 18:44:17    阅读次数:390
hdu 3926 Hand in Hand (同构图)
题目:           链接:点击打开链接 题意:           给两个图判断是否为同构图,是输出yes,不是输出no。 思路:            每个节点的最大度数为2,说明该图可能有多个连通分量,为环或链,遍历每个连通分量,记录该连通分量的结点个数以及他是环还是链。每个图按结点的个数排序,若子结点个数相等,则链先。排序后,比较两个图的是否每个元素都相等,如果相等则为同构...
分类:其他好文   时间:2014-06-10 17:44:18    阅读次数:388
【leetcode】sort list
问题:对链表进行排序,要求时间复杂度为NlogN。归并排序。 inline ListNode* getMidle(ListNode *head){ if(NULL == head || NULL == head->next) return head; ListNode *pslow = head; ListNode *pfast = head; while (pfast->next...
分类:其他好文   时间:2014-06-10 17:35:56    阅读次数:282
[leetcode]Integer to Roman @ Python
原题地址:https://oj.leetcode.com/problems/integer-to-roman/题意:Given an integer, convert it to a roman numeral.Input is guaranteed to be within the range f...
分类:编程语言   时间:2014-06-10 17:06:11    阅读次数:261
[leetcode]Letter Combinations of a Phone Number @ Python
原题地址:https://oj.leetcode.com/problems/letter-combinations-of-a-phone-number/题意:Given a digit string, return all possible letter combinations that the ...
分类:编程语言   时间:2014-06-10 16:40:57    阅读次数:223
第六章 堆排序 6.5 优先队列
package chap06_Heap_Sort;import static org.junit.Assert.*;import java.util.ArrayList;import java.util.Arrays;import org.junit.Test;/** * 优先队列,二叉堆数组实现,...
分类:其他好文   时间:2014-06-10 16:40:14    阅读次数:347
[leetcode]Longest Common Prefix @ Python
原题地址:https://oj.leetcode.com/problems/longest-common-prefix/题意:Write a function to find the longest common prefix string amongst an array of strings.解...
分类:编程语言   时间:2014-06-10 16:31:52    阅读次数:261
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!