Solving Weighted Random Sorting at Scale (O(N log N) approach)