- 博客(6)
- 收藏
- 关注
原创 leetcode 17-18
leetcode 17 : Letter Combinations of a Phone Number问题描述Given a digit string, return all possible letter combinations that the number could represent.A mapping of digit to letters (just like on the tele
2017-09-25 17:39:33 286
原创 leetcode 16: 3Sum Closest
Given an array S of n integers, find three integers in S such that the sum is closest to a given number, target. Return the sum of the three integers.
2017-09-21 13:33:56 181
原创 leetcode 15 : 3sum
leetcode 15 : 3sum问题描述Given an array S of n integers, are there elements a, b, c in S such that a + b + c = 0? Find all unique triplets in the array which gives the sum of zero.
2017-09-21 13:31:55 208
转载 python实现简单网络爬虫
通过学习imooc网上的教程,自己实现了python 的简单爬虫程序(爬取百度百科上的 python页面的一百个链接以及其中的title和summary)组成爬虫的关键模块包括URL管理器,HTML下载器,和HTML解析器在前期需要找到数据的抓取策略,从html文件中找到所需要的数据,以及数据的特征,利用正则表达式来匹配。main.pyfrom baike import h
2017-01-16 23:49:32 410
原创 构建最小生成树的prim算法
Prim算法通过不断地增加生成树的顶点来得到最小生成树。在算法的任一时刻,一部分顶点已经添加到生成树的顶点集合中,而其余的顶点尚未加到生成树中。此时,Prim算法通过选择边(u,v),使得(u,v)的权值是所有u在生成树中但v不在生成树中的边的权值的最小者,从而找到新的顶点v并把它添加到生成树中,最后得到生成树的所有EDGE。下面是代码template Edge * Prim
2016-12-08 18:49:57 814
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人