[LeetCode] Minimum Window Substring

Minimum Window SubstringGiven 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 = "ADOBECODEBANC"T...

Linux获得本机公网ip

我们主要使用的两个命令,curl 和 wget。你可以换着用。Curl 纯文本格式输出:curl icanhazip.com curl ifconfig.me curl curlmyip.com curl ip.appspot.com curl ipinfo.io/ip curl ipecho.net/plain curl&n...

你应该认识的 12 位最有影响力的程序员

Linus Torvalds

我们每天所玩的 app 或游戏,不是凭空生出来,而是有某些人在某些地方,呕心沥血,以一行一行程序写出来的。平台、网页、网络本身,都是起源于此。现在工程师写程序创造一个又一个便利的产品,也是站在巨人肩膀上的结晶。Business Insider列出 12位至今仍在世的重要工程师,让我们来认识这些程序界的大前辈吧!自由操作系统 Linux 开发者&nb...

[LeetCode] Edit Distance



Edit DistanceGiven two words word1 and word2, find the minimum number of steps required to convert word1 to word2. (each operation is counted as 1 step.)You have the foll...

[LeetCode] Missing Number

Missing NumberGiven an array containing n distinct numbers taken from 0, 1, 2, ..., n, find the one that is missing from the array.For example,Given nums = [0, 1, 3] ...

[LeetCode] Text Justification

Text JustificationGiven an array of words and a length L, format the text such that each line has exactly L characters and is fully (left and right) justified.You should pack your words...

[LeetCode] Insert Interval

Insert IntervalGiven a set of non-overlapping intervals, insert a new interval into the intervals (merge if necessary).You may assume that the intervals were initially sorted according to th...

[LeetCode] Merge Intervals

Merge IntervalsGiven a collection of intervals, merge all overlapping intervals.For example,Given [1,3],[2,6],[8,10],[15,18],return [1,6],[8,10],[15,18].解题思路:数组区域合并。首先将原数组按照左边界排序,然后扫描数组。每次比较...

[LeetCode] N-Queens II



N-Queens IIFollow up for N-Queens problem.Now, instead outputting board configurations, return the total number of distinct solutions.解题思路:这道题与http://blog.csdn.net/kangrydotnet/article/details/4785746...

[LeetCode] N-Queens



N-QueensThe n-queens puzzle is the problem of placing n queens on an n×n chessboard such that no two queens attack each other.Given an integer n, return all distinct solu...