随笔分类 -  动态规划

摘要:Description You are given an integer array nums. You should move each element of nums into one of the two arrays A and B such that A and B are non-emp 阅读全文
posted @ 2021-08-20 19:47 tmortred 阅读(48) 评论(0) 推荐(0)
摘要:Description Given an array of integers A, find the number of triples of indices (i, j, k) such that: 0 <= i < A.length 0 <= j < A.length 0 <= k < A.le 阅读全文
posted @ 2020-07-09 18:55 tmortred 阅读(115) 评论(0) 推荐(0)
摘要:Description You want to schedule a list of jobs in d days. Jobs are dependent (i.e To work on the i-th job, you have to finish all the jobs j where 0 阅读全文
posted @ 2020-07-08 19:41 tmortred 阅读(384) 评论(0) 推荐(0)
摘要:Description Given an array of integers cost and an integer target. Return the maximum integer you can paint under the following rules: The cost of pai 阅读全文
posted @ 2020-07-04 16:04 tmortred 阅读(232) 评论(0) 推荐(0)
摘要:Description Given a string S and a string T, count the number of distinct subsequences of S which equals T. A subsequence of a string is a new string 阅读全文
posted @ 2020-07-04 14:31 tmortred 阅读(103) 评论(0) 推荐(0)
摘要:Description In a given array nums of positive integers, find three non-overlapping subarrays with maximum sum. Each subarray will be of size k, and we 阅读全文
posted @ 2020-07-04 10:55 tmortred 阅读(123) 评论(0) 推荐(0)
摘要:Description Your car starts at position 0 and speed +1 on an infinite number line. (Your car can go into negative positions.) Your car drives automati 阅读全文
posted @ 2020-07-04 10:50 tmortred 阅读(125) 评论(0) 推荐(0)
摘要:description Given a positive integer N, return the number of positive integers less than or equal to N that have at least 1 repeated digit. Example In 阅读全文
posted @ 2020-06-25 11:49 tmortred 阅读(139) 评论(0) 推荐(0)
摘要:Descpition There are n people and 40 types of hats labeled from 1 to 40. Given a list of list of integers hats, where hats[i] is a list of all hats pr 阅读全文
posted @ 2020-06-25 11:30 tmortred 阅读(134) 评论(0) 推荐(0)