原创 79. Word Search

[LeetCode] 79. Word Search Given a 2D board and a word, find if the word exists in the grid. The word can be const

原创 [LeetCode] 81. Search in Rotated Sorted Array II

[LeetCode] 81. Search in Rotated Sorted Array II Follow up for “Search in Rotated Sorted Array”: What if dupli

原创 80. Remove Duplicates from Sorted Array II

[LeetCode] 80. Remove Duplicates from Sorted Array II Follow up for “Remove Duplicates”: What if duplicates are a

原创 [LeetCode] 78. Subsets

[LeetCode] 78. Subsets Given a set of distinct integers, nums, return all possible subsets. Note: The solution set

原创 [LeetCode] 73. Set Matrix Zeroes

[LeetCode] 73. Set Matrix Zeroes Given a m x n matrix, if an element is 0, set its entire row and column to 0. Do

原创 [LeetCode] 77. Combinations

[LeetCode] 77. Combinations Given two integers n and k, return all possible combinations of k numbers out of 1 … n

原创 83 & 84. Remove Duplicates from Sorted List I & II

[LeetCode] 83 & 84. Remove Duplicates from Sorted List I & II Given a sorted linked list, delete all duplicates s

原创 [LeetCode] 75. Sort Colors

[LeetCode] 75. Sort Colors Given an array with n objects colored red, white or blue, sort them so that objects of

原创 [LeetCode] 28. Implement strStr()

[LeetCode] 28. Implement strStr() Implement strStr(). Returns the index of the first occurrence of needle in hayst

原创 [LeetCode] 71. Simplify Path

[LeetCode] 71. Simplify Path Given an absolute path for a file (Unix-style), simplify it. For example, path = “/h

原创 [LeetCode] 68. Text Justification

[LeetCode] 68. Text Justification Given an array of words and a length L, format the text such that each line has

原创 [LeetCode] 74. Search a 2D Matrix

[LeetCode] 74. Search a 2D Matrix Write an efficient algorithm that searches for a value in an m x n matrix. This

原创 [LeetCode] 76. Minimum Window Substring

[LeetCode] 76. Minimum Window Substring Given a string S and a string T, find the minimum window in S which will c

原创 [LeetCode] 72. Edit Distance

[LeetCode] 72. Edit Distance Given two words word1 and word2, find the minimum number of steps required to convert

原创 [LeetCode] 99. Recover Binary Search Tree

[LeetCode] 99. Recover Binary Search Tree Two elements of a binary search tree (BST) are swapped by mistake. Recover t