04 2015 档案
摘要:题目:there are two sorted arrays nums1 and nums2 of size m and n respectively.Find the median of the two sorted arrays.The overall run time complexity s...
阅读全文
摘要:原题:Given a string, find the length of the longest substring without repeating characterFor example, the Longest substring without repeating letters fo...
阅读全文
摘要:原题:You are given two linked lists representing two non-negative numbers.The digits are stored in reverse order and each of their nodes contain a singl...
阅读全文
摘要:所有字符串匹配算法的核心问题是,当出现不匹配时,如何向后移动模式串一、暴力匹配算法 如果要匹配一个字符串s 和一个模式串p,则从i=0开始依次匹配s[i:(i+len(p))],简单粗暴,代码如下:def matcher(t, p): # param t: the string to chec...
阅读全文

浙公网安备 33010602011771号