LeetCode – 118. Pascal’s Triangle

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

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

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()

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

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

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

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

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

LeetCode – 598. Range Addition II

Given an m * n matrix M initialized with all 0‘s and several update operations. Operations are…

LeetCode – 594. Longest Harmonious Subsequence

LeetCode – 594. Longest Harmonious Subsequence

We define a harmonious array is an array where the difference between its maximum value and its mini…

返回顶部