
LeetCode
Smartershining
这个作者很懒,什么都没留下…
展开
-
Longest String Chain
1、题目 Given a list of words, each word consists of English lowercase letters. Let's sayword1is a predecessor ofword2if and only if we can add exactly one letter anywhere inword1to make it equal...原创 2019-05-25 23:30:03 · 298 阅读 · 0 评论 -
Possible Bipartition
1、题目 Given a set ofNpeople (numbered1, 2, ..., N), we would like to split everyone into two groups ofanysize. Each person may dislike some other people, and they should not go into the same gro...原创 2019-05-26 11:48:16 · 204 阅读 · 0 评论 -
K-diff Pairs in an Array
1、题目 Given an array of integers and an integerk, you need to find the number ofuniquek-diff pairs in the array. Here ak-diffpair is defined as an integer pair (i, j), whereiandjare both numb...原创 2019-06-02 10:39:04 · 179 阅读 · 0 评论 -
1031. Maximum Sum of Two Non-Overlapping Subarrays
1、题目 Given an arrayAof non-negative integers, return the maximum sum of elements in two non-overlapping (contiguous) subarrays, which have lengthsLandM. (For clarification, theL-length subarra...原创 2019-06-10 23:51:43 · 244 阅读 · 0 评论