diff --git a/content/Classic Questions/Lowest Price With Specified Quality.md b/content/Classic Questions/Lowest Price With Specified Quality.md index 639df5a..986fbc9 100644 --- a/content/Classic Questions/Lowest Price With Specified Quality.md +++ b/content/Classic Questions/Lowest Price With Specified Quality.md @@ -13,6 +13,7 @@ struct ProductInfo { // higher number means better quality int quality; // [0, 10000] int price; // [0, INT_MAX) +}; ``` Given a collection of `ProductInfo`, then answer several queries. @@ -28,7 +29,7 @@ We could also say: Given array of pair `{a, b}`, when query gives `k`, find pair ## Complexity Requirement -Answer query should be in $O(1)$ time complexity after $O(n)$ pre-processing. Where $n$ is the range size of `pair.a` +Answer query should be in $O(1)$ time complexity after $O(n)$ pre-processing in which $n$ is the range size of `pair.a` # Solution