Leetcode 526. Beautiful Arrangement

题目

526. Beautiful Arrangement

  • Difficulty: Middle
  • Total Accepted: 31,338
  • Total Submissions: 59,005

Leetcode 945. Minimum Increment to Make Array Unique

题目

945. Minimum Increment to Make Array Unique

  • Difficulty: Middle
  • Total Accepted: 5,139
  • Total Submissions: 12,879

Leetcode 948. Bag of Tokens

题目

948. Bag of Tokens

  • Difficulty: Middle
  • Total Accepted: 3,132
  • Total Submissions: 8,230

Leetcode 188. Best Time to Buy and Sell Stock

本题有四个不同难度的版本:

下面分题进行讲解:

121. Best Time to Buy and Sell Stock

  • Difficulty: Easy
  • Total Accepted: 379.2K
  • Total Submissions: 843.6K

Say you have an array for which the ith element is the price of a given stock on day i.

If you were only permitted to complete at most one transaction (i.e., buy one and sell one share of the stock), design an algorithm to find the maximum profit.

Note that you cannot sell a stock before you buy one.

Leetcode 140. Word Break

题目

本题有两个不同难度的版本:139. Word Break 和 140. Word Break II。

139. Word Break

  • Difficulty: Medium
  • Total Accepted: 263K
  • Total Submissions: 798K

Given a non-empty string s and a dictionary wordDict containing a list of non-empty words, determine if s can be segmented into a space-separated sequence of one or more dictionary words.

Note:

The same word in the dictionary may be reused multiple times in the segmentation.
You may assume the dictionary does not contain duplicate words.

Example 1:

Input: s = "leetcode", wordDict = ["leet", "code"]
Output: true
Explanation: Return true because "leetcode" can be segmented as "leet code".

Example 2:

Input: s = "applepenapple", wordDict = ["apple", "pen"]
Output: true
Explanation: Return true because "applepenapple" can be segmented as "apple pen apple".
             Note that you are allowed to reuse a dictionary word.

Example 3:

Input: s = "catsandog", wordDict = ["cats", "dog", "sand", "and", "cat"]
Output: false

Leetcode 32. Longest Valid Parentheses

题目

32. Longest Valid Parentheses

  • Difficulty: Hard
  • Total Accepted: 152.4K
  • Total Submissions: 632.8K

Leetcode 135. Candy

题目

135. Candy

  • Difficulty: Hard
  • Total Accepted: 87.48K
  • Total Submissions: 330.65K

Leetcode 44. Wildcard Matching

题目

44. Wildcard Matching

  • Difficulty: Hard
  • Total Accepted: 144.11K
  • Total Submissions: 665.07K

Leetcode 65. Valid Number

题目

65. Valid Number

  • Difficulty: Hard
  • Total Accepted: 99.5K
  • Total Submissions: 753.7K

Leetcode 839. Similar String Groups

题目

839. Similar String Groups

  • Difficulty: Hard
  • Total Accepted: 4.7K
  • Total Submissions: 14K
Your browser is out-of-date!

Update your browser to view this website correctly. Update my browser now

×