Smoothsort is an alternative sorting algorithm that works by maintaining a family of heaps called Leonardo heaps. It works by inserting elements into the appropriate Leonardo heap and then restoring the heap property more efficiently than standard heapsort. Smoothsort runs in O(n log n) time like heapsort but has a lower asymptotic graph, making it more efficient in practice. It works by inserting into the appropriate Leonardo heap based on its size and then fixing violations by swapping elements up the tree.