About 19,700 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 …

  2. 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 …

  3. 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 …

  4. Subarray Sum Equals K - LeetCode

    Can you solve this real interview question? 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 …

  5. Contiguous Array - LeetCode

    Contiguous Array - Given a binary array nums, return the maximum length of a contiguous subarray with an equal number of 0 and 1. Example 1: Input: nums = [0,1] Output: 2 …

  6. 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 = …

  7. Maximum Ascending Subarray Sum - LeetCode

    Maximum Ascending Subarray Sum - Given an array of positive integers nums, return the maximum possible sum of an strictly increasing subarray in nums. A subarray is defined as a …

  8. Maximum Subarray With Equal Products - LeetCode

    1. Please don't post any solutions in this discussion. 2. The problem discussion is for asking questions about the problem or for sharing tips - anything except for solutions. 3. If you'd like …

  9. Continuous Subarray Sum - LeetCode

    1. Please don't post any solutions in this discussion. 2. The problem discussion is for asking questions about the problem or for sharing tips - anything except for solutions. 3. If you'd like …

  10. 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 …