码迷,mamicode.com
首页 >  
搜索关键字:python list tuple    ( 183691个结果
【python爬虫】根据查询词爬取网站返回结果
最近在做语义方面的问题,需要反义词。就在网上找反义词大全之类的,但是大多不全,没有我想要的。然后就找相关的网站,发现了http://fanyici.xpcha.com/5f7x868lizu.html,还行能把“老师”-“学生”,“医生”-“病人”这样对立关系的反义词查出来。一开始我想把网站中数据库...
分类:编程语言   时间:2014-05-16 08:10:36    阅读次数:465
C++ 容器及选用总结
第1章容器第1条:慎重选择容器类型。标准STL序列容器:vector、string、deque和list。标准STL关联容器:set、multiset、map和multimap。非标准序列容器slist和rope。slist是一个单向链表,rope本质上是一“重型”string。非标准的关联容器ha...
分类:编程语言   时间:2014-05-16 07:50:48    阅读次数:390
Set与list测试
public class SetTest { public static void main(String[] args) { Set set = new HashSet(); List list = new ArrayList(); list.add...
分类:其他好文   时间:2014-05-16 07:18:35    阅读次数:263
python中windows下ssh登录linux
http://world77.blog.51cto.com/414605/668107
分类:编程语言   时间:2014-05-16 06:19:50    阅读次数:254
python,遍历文件的方法
在做验证码识别时,识别时需要和库里的图片对比,找到最接近的那个图片,然后就行到了用与图片一致的字符命名,获取文件的名称,去将图片的名称读出来作为验证码。以下是我通过网上的资料总结的两种文件遍历的方式。 首先要获得文件夹的路径,我是对某个文件夹下的文件进行遍历,需要去除文件的后缀,注:num为我...
分类:编程语言   时间:2014-05-16 05:49:47    阅读次数:305
LeetCode OJ - Sort List
题目: Sort a linked list inO(nlogn) time using constant space complexity.解题思路: 复杂度为O(n* logn) 的排序算法有:快速排序、堆排序、归并排序。对于链表这种数据结构,使用归并排序比较靠谱。递归代码如下:代码: /...
分类:其他好文   时间:2014-05-16 05:49:04    阅读次数:266
LeetCode OJ - Insertion Sort List
题目: Sort a linked list using insertion sort.解题思路: 假设 list[1..i]是排好序的,找到第i+1个元素应该插入的位置及其前驱,然后将其插入。代码: /** * Definition for singly-linked list. * str...
分类:其他好文   时间:2014-05-16 05:47:08    阅读次数:258
LeetCode---Remove Nth Node From End of List
题目链接题意: 给出单链表头指针head和整数n, 要求删除链表的倒数第n个结点, 这里n保证是合法的输入.我的思路....其实我没大明白题目建议的one pass是什么意思, 可能就是遍历一遍链表的, 不过我还是秉着能A掉就万岁的心态...我还是首先记录了链表的长度, 然后删除第len - n +...
分类:其他好文   时间:2014-05-16 05:45:56    阅读次数:348
LeetCode OJ - Linked List Cycle
题目: Given a linked list, determine if it has a cycle in it. Follow up: Can you solve it without using extra space?解题思路: 使用快慢指针,快指针每次走两步,慢指针每次走一步...
分类:其他好文   时间:2014-05-16 05:19:21    阅读次数:271
LeetCode OJ - Linked List Cycle II
题目: Given a linked list, return the node where the cycle begins. If there is no cycle, returnnull. Follow up: Can you solve it without using extr...
分类:其他好文   时间:2014-05-16 04:50:13    阅读次数:329
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!