Leetcode

Combination Sum

[LeetCode] 0039. Combination Sum

Given an array of distinct integers candidates and a target integer target, return a list of all unique combinations of candidates where the chosen numbers sum to target. You may return the combinations in any order.

The same number may be chosen from candidates an unlimited number of times. Two combinations are unique if the frequency of at least one of the chosen numbers is different.

The test cases are generated such that the number of unique combinations that sum up to target is less than 150 combinations for the given input.

[LeetCode] 0039. Combination Sum 阅读更多 ”

Leetcode, 技术文章
Longest Common Subsequence

[LeetCode] 1143. Longest Common Subsequence

Given two strings text1 and text2, return the length of their longest common subsequence. If there is no common subsequence, return 0.

A subsequence of a string is a new string generated from the original string with some characters (can be none) deleted without changing the relative order of the remaining characters.

For example, “ace” is a subsequence of “abcde”.
A common subsequence of two strings is a subsequence that is common to both strings.

[LeetCode] 1143. Longest Common Subsequence 阅读更多 ”

Leetcode, 技术文章
zh_CN简体中文