Running sum of hash array such that hash [ i ] will give count of elements less than or equal to i in arr2 [ ]
for ( $ i = 1 ; $ i < $ GLOBALS [ ' MAX ' ] ; $ i ++ ) $ hash [ $ i ] = $ hash [ $ i ] + $ hash [ $ i - 1 ] ;