K-th Smallest Prime Fraction

  • 0

    Click here to see the full article post

  • 0

    In the second solution, it seems to me that the time complexity may be dominated by the very first loop initializing the heap. Thus, I think the time complexity should be max(K,N)log N. Is that right?

Log in to reply

Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.