Given an array of positive integers `arr` and a number `X`, find the **minimum length** of a contiguous subarray such that the sum of its elements is strictly greater than `X`. If no such subarray exists, return 0.
arr = array of positive integers, X = target sum
integer (length of smallest subarray with sum > X, or 0 if none)
Example 1:
Input:
arr = [1,4,45,6,10,19] X = 51
Output:
3
Example 2:
Input:
arr = [1,2,4,1,3] X = 7
Output:
3