diff --git a/posts/algorithms/leetcode-daily.html b/posts/algorithms/leetcode-daily.html index 9e10231..edd720d 100644 --- a/posts/algorithms/leetcode-daily.html +++ b/posts/algorithms/leetcode-daily.html @@ -158,12 +158,12 @@ runtime in terms of \(max\{n,m\}\).
- Time Complexity: \(O(nlg(n)+mlg(m)+m)=O(nlg(n)+mlg(m))\).
- An argument can be made that because
+ Time Complexity: \(O(nlg(n)+mlg(m)+m)\in
+ O(nlg(n)+mlg(m))\). An argument can be made that because
queries[i],items[i][{0,1}]\(\leq10^9\), radix sort
can be leveraged to achieve a time complexity of \(O(d \cdot (n +
- k + m + k)) = O(9 \cdot (n + m + 20)) = O(9n+9m + 180) = O(9n+9m)
- = O(n+m)\).
+ k + m + k))\in O(9\cdot (n + m))\in O(9n+9m)\in O(9n+9m)\in
+ O(n+m)\).
Space Complexity: \(\Theta(1)\), considering that \(O(m)\)