Skip to content

Commit 0d09efd

Browse files
authored
Update k-th-smallest-prime-fraction.cpp
1 parent 6c0ab50 commit 0d09efd

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

C++/k-th-smallest-prime-fraction.cpp

+3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
// Time: O(nlogr)
22
// Space: O(1)
33

4+
// Another cool O(n) solution by using quick select with median of median could be found here:
5+
// https://leetcode.com/problems/k-th-smallest-prime-fraction/discuss/115545/O(n)
6+
47
class Solution {
58
public:
69
vector<int> kthSmallestPrimeFraction(vector<int>& A, int K) {

0 commit comments

Comments
 (0)