自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(12)
  • 资源 (1)
  • 问答 (1)
  • 收藏
  • 关注

原创 Go concurrent crawler

下面是a tour of go 中最后一个练习的解法,本文使用了真正的网络io来运行爬虫,由于没有对连接数做限制,所以当depth为3时会发生错误package mainimport ( "fmt" "log" "strings" "sync" "github.com/PuerkitoBio/goquery")type Fetcher interface {

2017-12-29 20:19:18 384

原创 rot13Reader

package mainimport ( "io" "os" "strings")type rot13Reader struct { r io.Reader}func (rot rot13Reader) Read(b []byte) (n int, err error){ left:=len(b) for{ length,stat

2017-12-27 18:23:57 320

原创 397. Longest Increasing Continuous Subsequence

class Solution: """ @param: A: An array of Integer @return: an integer """ def longestIncreasingContinuousSubsequence(self, A): # write your code here if len(A)==0:

2017-12-24 12:12:31 216

原创 115. Unique Paths II

class Solution: """ @param: obstacleGrid: A list of lists of integers @return: An integer """ def uniquePathsWithObstacles(self, obstacleGrid): # write your code here

2017-12-24 12:04:53 190

原创 114. Unique Paths

class Solution: """ @param: m: positive integer (1 <= m <= 100) @param: n: positive integer (1 <= n <= 100) @return: An integer """ def uniquePaths(self, m, n): # write

2017-12-24 11:55:24 194

原创 111. Climbing Stairs

class Solution: """ @param n: An integer @return: An integer """ def climbStairs(self, n): # write your code here if n==0: return 0 if n==1:

2017-12-24 11:46:53 163

原创 110.Minimum Path Sum

class Solution: """ @param: grid: a list of lists of integers @return: An integer, minimizes the sum of all numbers along its path """ def minPathSum(self, grid): # write yo

2017-12-24 11:41:41 166

原创 109.triangle

class Solution: """ @param: triangle: a list of lists of integers @return: An integer, minimum path sum """ def minimumTotal(self, triangle): # write your code here

2017-12-24 11:31:50 181

原创 514. Paint Fence

class Solution {public: /* * @param n: non-negative integer, n posts * @param k: non-negative integer, k colors * @return: an integer, the total number of ways */ int numWa

2017-12-24 11:16:09 165

原创 kmp算法

#define MAX 10000void getNext(char *p,int next[]){ int p_len=strlen(p); next[0]=-1; next[1]=0; for (int i=2;i<p_len;i++){ int q=next[i-1]; while (q!=0 && p[q]!=p[i-1])

2017-12-23 00:20:48 144

原创 最长递增子序列(nlogn)

#define MAX 1000000int find(int a[],int x,int l,int r){ while (l<=r){ int mid=(l+r)/2; if (a[mid]==x) return mid; if (a[mid]<x) l=mid+1; els

2017-12-22 19:30:05 818

原创 排序算法大合集

#include<stdlib.h>#include<unistd.h>#include<stdio.h>#include<unistd.h>#include<sys/wait.h>#include<time.h>#define MAX 10000int check(int a[],int n){ for (int i=0;i<n-1;i++) if (a[i]>

2017-12-22 14:58:20 174

day1_NOIP基础算法--枚举、递推和递归.ppt

NOIP基础算法--枚举、递推和递归 很有用的哦,看看有好处的

2013-04-16

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除