Running sum of hash array such that hash [ i ] will give count of elements less than or equal to i in arr2 [ ]
for i in range ( 1 , MAX , 1 ) : NEW_LINE INDENT hash [ i ] = hash [ i ] + hash [ i - 1 ] NEW_LINE DEDENT