Deals each element onto the leftmost pile whose top is greater than or equal to the element (found via binary search), starting a new pile if none qualifies. Then uses a k-way min-heap merge to pull the global minimum from all pile tops repeatedly until the sorted output is complete.
The number of piles equals the length of the Longest Increasing Subsequence (LIS) of the input. On already-sorted data only one pile is created and the algorithm runs in O(n); on reverse-sorted data n piles are created and the cost is O(n log n).