diff --git a/Selection Sampling/README.markdown b/Selection Sampling/README.markdown index ff80791e1..741f592f4 100644 --- a/Selection Sampling/README.markdown +++ b/Selection Sampling/README.markdown @@ -193,7 +193,7 @@ print(output.count) The performance of this second algorithm is **O(n)** as it may require a pass through the entire input array. -> **Note:** If `k > n/2`, then it's more efficient to do it the other way around and choose `k` items to remove. +> **Note:** If `k > n/2`, then it's more efficient to do it the other way around and choose `a.count - k` items to remove. Based on code from Algorithm Alley, Dr. Dobb's Magazine, October 1993.