Leetcode 786. K-th Smallest Prime Fraction
Given a sorted array of unique primes (starting with 1), find the k-th smallest fraction arr[i]/arr[j] (with i<j) among all pairs; the challenge is to rank these O(n^2) fractions without enumerating them, typically solved via a value-based binary search with two-pointer counting or by using a best-first (min-heap) generation of candidate fractions.
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
0
Hello Interview Premium
Your account is free and you can post anonymously if you choose.