
LeetCode – 119. Pascal’s Triangle II
Given an index k, return the kth row of the Pascal’s triangle. For example, given k = 3, Retur…

LeetCode – 118. Pascal’s Triangle
Given numRows, generate the first numRows of Pascal’s triangle. For example, given numRows = 5…

LeetCode – 243. Shortest Word Distance
Given a list of words and two words word1 and word2, return the shortest distance between these two …

LeetCode – 520. Detect Capital
Given a word, you need to judge whether the usage of capitals in it is right or not. We define the u…

LeetCode – 28. Implement strStr()
Implement strStr(). Returns the index of the first occurrence of needle in haystack, or -1 if needle…

LeetCode – 605. Can Place Flowers
Suppose you have a long flowerbed in which some of the plots are planted and some are not. However, …

LeetCode – 624. Maximum Distance in Arrays
Given m arrays, and each array is sorted in ascending order. Now you can pick up two integers from t…

643. Maximum Average Subarray I
Given an array consisting of n integers, find the contiguous subarray of given length k that has the…

LeetCode – 628. Maximum Product of Three Numbers
Given an integer array, find three numbers whose product is maximum and output the maximum product. …

LeetCode – 598. Range Addition II
Given an m * n matrix M initialized with all 0‘s and several update operations. Operations are…