Longest subarray having average greater than or equal to x.
Given an array of N integers. The task is to find the longest contiguous subarray so that the average of its elements is greater than or equal to a given number X.
What will be the approach to solve the problem?