We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6c0ab50 commit 0d09efdCopy full SHA for 0d09efd
C++/k-th-smallest-prime-fraction.cpp
@@ -1,6 +1,9 @@
1
// Time: O(nlogr)
2
// Space: O(1)
3
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
+
7
class Solution {
8
public:
9
vector<int> kthSmallestPrimeFraction(vector<int>& A, int K) {
0 commit comments