随笔分类 - LeetCode
摘要:Proving NP-completeness by generalization. For each of the problems below, prove that it is NP-complete by showing that it is a generalizati...
阅读全文
摘要:DescriptionThere are a total of n courses you have to take, labeled from 0 to n - 1.Some courses may have prerequisites, for example to take c...
阅读全文
摘要:DescriptionGiven an unsorted array of integers, find the length of longest increasing subsequence. For example, Given [10, 9, 2, 5, 3, 7, 1...
阅读全文
摘要:DescriptionGiven an integer array, you need to find one continuous subarray that if you only sort this subarray in ascending order, then the w...
阅读全文
摘要:DescriptionGiven an array of integers and an integer k, you need to find the total number of continuous subarrays whose sum equals to k. Exam...
阅读全文
摘要:Description In MATLAB, there is a very useful function called ‘reshape’, which can reshape a matrix into a new one with different size but keep its or
阅读全文

浙公网安备 33010602011771号