Function to calculate the maximum number of equal elements possible with atmost K increment of values . Here we have done sliding window to determine that whether there are x number of elements present which on increment will become equal . The loop here will run in fashion like 0. . . x - 1 , 1. . . x , 2. . . x + 1 , ... . , n - x - 1. . . n - 1
< ? php function ElementsCalculationFunc ( $ pre , $ maxx , $ x , $ k , $ n ) { for ( $ i = 0 , $ j = $ x ; $ j <= $ n ; $ j ++ , $ i ++ ) {