You are given an array loads of length N, where loads[i] denotes the number of pieces in
loads
N
loads[i]
…
Given an array of values, determine the required result under the following conditions.
Input: [4, 8, 15, 16, 23, 42]
Output: 3
Constraints: 1 ≤ n ≤ 10⁵
Unlock the full statement, examples, constraints, and solution guidance.
Remaining sum is:
6
Hence, the answer is 6.
Run code to see test results
Amazon • 161 views
Amazon • 150 views
Amazon • 168 views
Amazon • 119 views
Amazon • 133 views