From 2aa27c86b7ad8f93aa96834d4684a5ca5053a2d1 Mon Sep 17 00:00:00 2001 From: Barrett Ruth Date: Tue, 12 Nov 2024 12:06:40 -0500 Subject: [PATCH] fix(post): user proper asymptotic notation syntax --- posts/algorithms/leetcode-daily.html | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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)\)