diff --git a/source/algorithms.tex b/source/algorithms.tex index 9c74d5dfbb..17f05b5c14 100644 --- a/source/algorithms.tex +++ b/source/algorithms.tex @@ -3502,7 +3502,7 @@ \pnum \complexity -\bigoh{N\log(N)} comparisons, where $N = \tcode{last - first}$. +\bigoh{N \log N} comparisons, where $N = \tcode{last - first}$. \end{itemdescr} \rSec3[stable.sort]{\tcode{stable_sort}} @@ -3541,7 +3541,7 @@ \complexity At most $N \log^2(N)$ comparisons, where -$N = \tcode{last - first}$, but only $N \log(N)$ comparisons if there is enough extra memory. +$N = \tcode{last - first}$, but only $N \log N$ comparisons if there is enough extra memory. \pnum \remarks Stable~(\ref{algorithm.stable}). @@ -4141,7 +4141,7 @@ \pnum \complexity -At most $N \log(N)$ swaps, where $N = \tcode{last - first}$, +At most $N \log N$ swaps, where $N = \tcode{last - first}$, but only \bigoh{N} swaps if there is enough extra memory. Exactly \tcode{last - first} @@ -4323,7 +4323,7 @@ \tcode{(last - first) - 1} comparisons. If no additional memory is available, an algorithm with complexity -$N \log(N)$ may be used, where $N = \tcode{last - first}$. +$N \log N$ may be used, where $N = \tcode{last - first}$. \pnum \remarks Stable~(\ref{algorithm.stable}). @@ -4670,7 +4670,7 @@ or a new element added by \tcode{push_heap()}, in -\bigoh{\log(N)} +\bigoh{\log N} time. \end{itemize} @@ -4822,7 +4822,7 @@ \pnum \complexity -At most $N \log(N)$ +At most $N \log N$ comparisons, where $N = \tcode{last - first}$. \end{itemdescr} diff --git a/source/containers.tex b/source/containers.tex index ac57a3f52b..c5c5004787 100644 --- a/source/containers.tex +++ b/source/containers.tex @@ -1778,7 +1778,7 @@ inserts each element from the range \range{i}{j} if and only if there is no element with key equivalent to the key of that element in containers with unique keys; always inserts that element in containers with equivalent keys. & - $N\log (\tcode{a.size()} + N)$, where $N$ has the value \tcode{distance(i, j)} \\ \rowsep + $N \log (\tcode{a.size()} + N)$, where $N$ has the value \tcode{distance(i, j)} \\ \rowsep \tcode{a.insert(il)} & \tcode{void} & @@ -5067,7 +5067,7 @@ \pnum \complexity Approximately -$N \log(N)$ +$N \log N$ comparisons, where \tcode{N == size()}. \end{itemdescr} @@ -5328,7 +5328,7 @@ calls to the copy constructor of \tcode{T} and order -$\log(N)$ +$\log N$ reallocations if they are just input iterators. \end{itemdescr} @@ -6208,7 +6208,7 @@ Linear in $N$ if the range \range{first}{last} is already sorted using \tcode{comp} -and otherwise $N \log{N}$, where $N$ +and otherwise $N \log N$, where $N$ is \tcode{last - first}. \end{itemdescr} @@ -6717,7 +6717,7 @@ Linear in $N$ if the range \range{first}{last} is already sorted using \tcode{comp} -and otherwise $N \log{N}$, +and otherwise $N \log N$, where $N$ is \tcode{last - first}. \end{itemdescr} @@ -7008,7 +7008,7 @@ Linear in $N$ if the range \range{first}{last} is already sorted using \tcode{comp} -and otherwise $N \log{N}$, +and otherwise $N \log N$, where $N$ is \tcode{last - first}. \end{itemdescr} @@ -7275,7 +7275,7 @@ Linear in $N$ if the range \range{first}{last} -is already sorted using \tcode{comp} and otherwise $N \log{N}$, +is already sorted using \tcode{comp} and otherwise $N \log N$, where $N$ is \tcode{last - first}. \end{itemdescr}