About 114,000 results
Open links in new tab
  1. Maximum Subarray - LeetCode

    Maximum Subarray - Given an integer array nums, find the subarray with the largest sum, and return its sum. Example 1: Input: nums = [-2,1,-3,4,-1,2,1,-5,4] Output: 6 Explanation: The subarray [4,-1,2,1] …

  2. Maximum Subarray Sum with One Deletion - LeetCode

    Maximum Subarray Sum with One Deletion - Given an array of integers, return the maximum sum for a non-empty subarray (contiguous elements) with at most one element deletion.

  3. Maximum Subarray Sum With Length Divisible by K - LeetCode

    Maximum Subarray Sum With Length Divisible by K - You are given an array of integers nums and an integer k. Return the maximum sum of a subarray of nums, such that the size of the subarray is …

  4. Maximum Sum of Distinct Subarrays With Length K - LeetCode

    Return the maximum subarray sum of all the subarrays that meet the conditions. If no subarray meets the conditions, return 0. A subarray is a contiguous non-empty sequence of elements within an array.

  5. Maximum Product Subarray - LeetCode

    Maximum Product Subarray - Given an integer array nums, find a subarray that has the largest product, and return the product. The test cases are generated so that the answer will fit in a 32-bit integer.

  6. Maximum Size Subarray Sum Equals k - LeetCode

    Can you solve this real interview question? Maximum Size Subarray Sum Equals k - Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get …

  7. Maximum Length of Repeated Subarray - LeetCode

    Maximum Length of Repeated Subarray - Given two integer arrays nums1 and nums2, return the maximum length of a subarray that appears in both arrays. Example 1: Input: nums1 = [1,2,3,2,1], …

  8. Subarray Sum Equals K - LeetCode

    Subarray Sum Equals K - Given an array of integers nums and an integer k, return the total number of subarrays whose sum equals to k. A subarray is a contiguous non-empty sequence of elements …

  9. Maximum Unique Subarray Sum After Deletion - LeetCode

    You are allowed to delete any number of elements from nums without making it empty. After performing the deletions, select a subarray of nums such that: 1. All elements in the subarray are unique. 2. The …

  10. Maximum Good Subarray Sum - LeetCode

    Maximum Good Subarray Sum - You are given an array nums of length n and a positive integer k. A subarray of nums is called good if the absolute difference between its first and last element is exactly …