Given two integer arrays A and B, return the maximum length of an subarray that appears in both arrays. Example 1: Note: 1 <= len ...
Given an integer arrayarr, returnthe length of a maximum size turbulent subarray ofarr. A subarray isturbulentif the comparison sign flips between each adjacent pair of elements in the subarray. More ...
2020-12-24 14:07 0 605 推薦指數:
Given two integer arrays A and B, return the maximum length of an subarray that appears in both arrays. Example 1: Note: 1 <= len ...
Given a string s, find the longest palindromic subsequence's length in s. You may assume that the maximum length of s is 1000. Example 1:Input ...
Given a group of two strings, you need to find the longest uncommon subsequence of this group of two strings. The longest uncommon subsequence ...
array, you need to find the length of its longest ...
Let's call any (contiguous) subarray B (of A) a mountain if the following properties hold: B.length >= 3 There exists some 0 < i < ...
Find the contiguous subarray within an array (containing at least one number) which has the largest sum. For example, given the array [-2,1,-3,4 ...
Given an array of integers and an integer k, you need to find the total number of continuous suba ...
Given an integer array, you need to find one continuous subarray that if you only sort this subarray in ascending order, then the whole array ...