Optimally selecting the top values from with layer-ordered heaps
arXiv:2001.11607
Abstract
Selection and sorting the Cartesian sum, , are classic and important problems. Here, a new algorithm is presented, which generates the top values of the form . The algorithm relies only on median-of-medians and is simple to implement. Furthermore, it uses data structures contiguous in memory, and is fast in practice. The presented algorithm is demonstrated to be theoretically optimal.