arr [ 0. . n - 1 ] represents sizes of packets m is number of students . Returns minimum difference between maximum and minimum values of distribution .
< ? php function findMinDiff ( $ arr , $ n , $ m ) {