Discussion About ARRAY-COST

This is Discussion thread about ARRAY-COST

explain nlogn solution of this problem