Independence Day Sale! Unlock 40% OFF on All Job-Oriented Training Programs – Limited Time Only! Offer Ending in
D
H
M
S
Get Now
Problem Submissions Solution

Sum of elements of smallest subarray greater than x

Difficulty: Easy

Acceptance: %

Points: 20.00

Given a number x and an array of integers arr, find the smallest subarray with sum greater than the given value. If such a subarray do not exist return 0 in that case.

Topics

Companies

Articles

Examples:

NA

Constraints:
  • 1 = arr.size, x = 105
  • 0 = arr[] = 104
Companies:
Amazon Meta Google Goldman Sachs
Topics:
Array
Locked Content
Access Restricted: Please Login to access the code editor and test cases.