Given an array of length N. How will you find the minimum length contiguous sub-array of whose sum is S and whose product is P. For eg 5 6 1 4 6 2 9 7 fo
5 6 1 4 6 2 9 7
fo
You can use a hashmap to find the answer for product in O(N) time with extra space.