Driver Code
$ arr = array ( 1 , 12 , -5 , -6 , 50 , 3 ) ; $ k = 4 ; $ n = count ( $ arr ) ; echo " The ▁ maximum ▁ average ▁ subarray ▁ of ▁ " , " length ▁ " , $ k , " ▁ begins ▁ at ▁ index ▁ " , findMaxAverage ( $ arr , $ n , $ k ) ; ? >