786. K-th Smallest Prime Fraction
Problem Statement
Input: arr = [1,2,3,5], k = 3
Output: [2,5]
Explanation: The fractions to be considered in sorted order are:
1/5, 1/3, 2/5, 1/2, 3/5, and 2/3.
The third fraction is 2/5.Input: arr = [1,7], k = 1
Output: [1,7]Intuition
Links
Video Links
Approach 1:
Approach 2:
Approach 3:
Approach 4:
Similar Problems
Last updated