Problem 786 · Medium

K-th Smallest Prime Fraction

Pop the smallest fraction from a min-heap k-1 times, advancing the numerator index each time.

Open the interactive visualisation