Number of subarrays having product less than K
Given an array of positive numbers, calculate the number of possible contiguous subarrays having product lesser than a given number K. Examples : Input : arr[] = [1, 2, 3, 4] K = 10Output : 7The subarrays are {1}, {2}, {3}, {4}, {1, 2}, {1, 2, 3} and {2, 3} Input : arr[] = [1, 9, 2, 8, 6, 4, 3] K =