1. Partition Equal Subset Sumhistorical

    Given a non-empty array containing only positive integers, determine whether the array can be partitioned into two subsets whose sums are equal.

  2. Word Breakhistorical

    Given a non-empty string s and a list wordDict containing non-empty words, determine whether s can be segmented by spaces into one or more words that appear in the dictionary.

  3. Perfect Squareshistorical

    Given a positive integer n, find several perfect-square numbers (such as 1, 4, 9, 16, ...) whose sum equals n. You need to minimize the number of perfect squares used.

  4. Word Searchhistorical

    Given a two-dimensional grid and a word, determine whether the word exists in the grid.

  5. Target Sumhistorical

    Assign a plus or minus sign to each number in a nonnegative integer array and count the assignments whose sum equals the target S.

  6. Longest Common Substringhistorical

    Given two strings str1 and str2, output their longest common substring. The problem guarantees that the longest common substring of str1 and str2 exists and is unique.

  7. Combination Sumhistorical

    Given an array candidates containing no duplicate elements and a target number target, find all combinations of numbers in candidates whose sum equals target.

  8. Design an LRU Cachehistorical

    Design an LRU cache with a fixed capacity K that supports key lookups and writes, evicting the least recently used entry when capacity is reached.

  9. Coin Changehistorical

    Given coins of different denominations and a total amount, write a function to compute the minimum number of coins needed to make up that amount. If no combination of coins can make up the amount, return -1.

  10. Longest Common Subsequencehistorical

    Given two strings text1 and text2, return the length of their longest common subsequence.