原创 [leetcode]Median of Two Sorted Arrays

新博文地址: [leetcode]Median of Two Sorted Arrays Median of Two Sorted Arrays There are two sorted arrays A and B of size m

原创 [leetcode]Gas Station

新博文地址:[leetcode]Gas Station Gas Station There are N gas stations along a circular route, where the amount of gas at s

原创 [leetcode]Distinct Subsequences

新博文地址:[leetcode]Distinct Subsequences Distinct Subsequences Given a string S and a string T, count the number of disti

原创 [leetcode]Substring with Concatenation of All Words

新博文地址:[leetcode]Substring with Concatenation of All Words Substring with Concatenation of All Words You are given a st

原创 [leetcode]Permutation Sequence

算法還是一樣的算法,但是新博文的代碼更簡潔,可讀性更好,新博文地址:[leetcode]Permutation Sequence Permutation Sequence The set [1,2,3,…,n] contains a t

原创 [leetcode]Minimum Window Substring

新博文地址:[leetcode]Minimum Window Substring   Minimum Window Substring Given a string S and a string T, find the minimum

原创 [leetcode]Permutations II

新博文地址:[leetcode]PermutationsII Permutations II Given a collection of numbers that might contain duplicates, return al

原创 [leetcode]Palindrome Partitioning II

新博文地址:   [leetcode]Palindrome Partitioning II   Palindrome Partitioning II Given a string s, partition s such that eve

原创 [leetcode]Longest Valid Parentheses

新博文地址:[leetcode]Longest Valid Parentheses Longest Valid Parentheses Given a string containing just the characters '('

原创 [leetcode]Word Ladder

Word Ladder Given two words (start and end), and a dictionary, find the length of shortest transformation sequence fro

原创 [leetcode]Word Break II

本博文的方法有點投機取巧了,新博文中採取了更通用的解法,新博文地址:[leecode]Word Break II     Word Break II Given a string s and a dictionary of words

原创 [leetcode]Regular Expression Matching

新博客地址: [leetcode]Regular Expression Matching Regular Expression Matching Implement regular expression matching with su

原创 [leetcode]First Missing Positive

新博文地址:[leetcode]First Missing Positive First Missing Positive Given an unsorted integer array, find the first missing

原创 [leetcode]Word Break

新博文地址:[leetcode]Word Break   Word Break Given a string s and a dictionary of words dict, determine if s can be segmen

原创 [leetcode]Surrounded Regions

dfs過得太蹊蹺了,本博文算法作廢,新博文地址:[leetcode]Surrounded Regions   Surrounded Regions Given a 2D board containing 'X' and 'O', ca