public static void main(String args[]){
        int input[] = {8, 5, 10, 7, 9, 4, 15, 12, 90, 13};
        MaximumOfSubarrayOfSizeK msa = new MaximumOfSubarrayOfSizeK();
        int max[] = msa.maxSubArray(input, 4);
        for(int i : max){
            System.out.print(i + " ");
        }
    }
http://www.geeksforgeeks.org/maximum-of-all-subarrays-of-size-k/
Test cases
input containg neg and pos values
val of k is neg 0 or pos
val of k is larger than size of input
val of k is same as size of input
src/com/interview/array/MaximumOfSubarrayOfSizeK.java