最小编辑距离,动态规划经典题。 Given two words word1 and word2, find the minimum number of steps required to convert word1 to word2. (each operation is counted as 1 ...
分类:
其他好文 时间:
2016-09-28 01:23:20
阅读次数:
159
We could find some important clue in Restore Point because "System Protection" of volume C is enabled in Windows default settings. Lots of data in "My ...
Given an array of n positive integers and a positive integer s, find the minimal length of a subarray of which the sum ≥ s. If there isn't one, return ...
分类:
其他好文 时间:
2016-09-27 14:49:55
阅读次数:
117
在安装一些Python模块时,大部分是cpython写的模块时会发生如下错误 error: Unable to find vcvarsall.bat。先前的一篇文章:在Windows上安装Scrapy时也讲到了这个问题。当时讲到的方案是,安装VS 2008进行解决,但是Vs 2008又太大,不想装, ...
分类:
编程语言 时间:
2016-09-27 13:15:16
阅读次数:
167
Median is the middle value in an ordered integer list. If the size of the list is even, there is no middle value. So the median is the mean of the two ...
分类:
其他好文 时间:
2016-09-27 13:08:46
阅读次数:
132
使用arm-linux-gcc编译的可执行文件可能会无法在开发板上执行,并提示:-/bin/sh xxx not found 解决办法: 在主机上使用readelf -d xxx 来查看该程序所需要的动态库,比如 在交叉编译目录你搜索<find -name 'libc.so.6'>,然后将其拷贝到根 ...
分类:
其他好文 时间:
2016-09-27 11:33:33
阅读次数:
200
我自己的想法 1. 建一个list。 1)每次add就用Binary search找到插入的位置,插入O(logn) 2) 每次find就two pointer。O(n) 2. 一个arr 1)每次add直接加 O(1) 2)find就先sort,再two pointer. O(nlogn) 3. ...
分类:
其他好文 时间:
2016-09-27 09:08:18
阅读次数:
107
Given a string S and a string T, find the minimum window in S which will contain all the characters in T in complexity O(n). For example,S = "ADOBECOD ...
You are given a string, s, and a list of words, words, that are all of the same length. Find all starting indices of substring(s) in s that is a conca ...
分类:
其他好文 时间:
2016-09-27 00:25:12
阅读次数:
137
15. 3Sum:三数之和为0的组合 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 whic ...
分类:
编程语言 时间:
2016-09-26 23:06:33
阅读次数:
161