About 663,000 results
Open links in new tab
  1. Minimum Absolute Difference Queries - LeetCode

    For each query i, compute the minimum absolute difference of the subarray nums [li...ri] containing the elements of nums between the 0-based indices li and ri (inclusive).

  2. Minimum Size Subarray Sum - LeetCode

    Can you solve this real interview question? Minimum Size Subarray Sum - Given an array of positive integers nums and a positive integer target, return the minimal length of a subarray …

  3. 1906. Minimum Absolute Difference Queries - AlgoMonster

    In this LeetCode problem, we're required to find the minimum absolute difference of subarrays within a given integer array nums. A subarray is specified through a range given in queries, …

  4. Smallest subarray with sum greater than a given value

    Jul 23, 2025 · To handle negative numbers, add a condition to ignore subarrays with negative sums. We can use the solution discussed in Find subarray with given sum with negatives …

  5. Split array into two subarrays such that difference of their sum is minimum

    Jul 15, 2025 · Explanation: The difference between the sum of the subarrays {7, 9} and {5, 10} is equal to [16 – 15] = 1, which is the minimum possible. Naive Approach: The idea is to use the …

  6. Divide an array into k partitions subarray that have minimum difference

    Jan 2, 2020 · In my problem, subarrays have elements not contiguous and number of elements in is not constant, as long as the difference between max and min sum of list subarrays is min …

  7. Minimum Difference Of Subarrays - Naukri Code 360

    Aug 23, 2021 · We can split the array into [6,7,1] and [8,5]. Hence the answer will be |14-13| = 1 which is minimum. The first line of the input contains an integer, 'T,’ denoting the number of …

  8. Find Subarray With Bitwise OR Closest to K - LeetCode

    Find Subarray With Bitwise OR Closest to K - You are given an array nums and an integer k. You need to find a subarray of nums such that the absolute difference between k and the bitwise …

  9. Minimum subarray difference in python - Stack Overflow

    Oct 22, 2015 · I'm at a pc now and I tested a few small examples with 2 elements in the array. [1,4] => 3, [5,2] => 3, [5, -2] => 3. The last one suggest that the complete array is taken vs an …

  10. Subarrays, Subsequences, and Subsets in Array - GeeksforGeeks

    6 days ago · A subarray is a contiguous part of array, i.e., Subarray is an array that is inside another array. In general, for an array of size n, there are n* (n+1)/2 non-empty subarrays.

  11. Some results have been removed