diff --git a/304_Halden.tex b/304_Halden.tex index 18ef58ad55860b9ae97149095d0e24b706f8a010..1ac67790241758fb5669e6a2694ac7d6000d35e2 100644 --- a/304_Halden.tex +++ b/304_Halden.tex @@ -144,7 +144,7 @@ sortiert das Array. \paragraph{Laufzeit:} Es reicht hier obige Abschätzung, dass $\texttt{heapify\_array}$ einen asymptotischen Aufwand von $\mathcal{O}(n \log -n)$ hat. Die Laufzeit wird von den $\frac{n}{2}$ aufrufen von $\texttt{heapify}$, welches $\mathcal{O}(\log n)$ Aufwand +n)$ hat. Die Laufzeit wird von den $\frac{n}{2}$ Aufrufen von $\texttt{heapify}$, welches $\mathcal{O}(\log n)$ Aufwand hat, eh dominiert. Also liegt die Laufzeit in $\mathcal{O}(n \log n)$. Damit ist $\texttt{heapsort}$ also worst-case optimal.