Sum Between Range
Easy
Given an integer array, write a function which returns the sum of values between two indexes.
Example:

Input: nums = [3, -7, 6, 0, -2, 5],
[sum_range(0, 3), sum_range(2, 4), sum_range(2, 2)]
Output: [2, 4, 6]
Constraints:
numscontains at least one element.- Each
sum_rangeoperation will query a valid range of the input array.
K-Sum Subarrays
Medium
Find the number of subarrays in an integer array that sum to k.
Example:

Input: nums = [1, 2, -1, 1, 2], k = 3
Output: 3
Product Array Without Current Element
Medium
Given an array of integers, return an array res so that res[i] is equal to the product of all the elements of the input array except nums[i] itself.
Example:
Input: nums = [2, 3, 1, 4, 5]
Output: [60, 40, 120, 30, 24]
Explanation: The output value at index 0 is the product of all numbers except nums[0] (3⋅1⋅4⋅5 = 60). The same logic applies to the rest of the output.