Eric found some bugs
parent
9377dcafbb
commit
e72dc5d23a
|
@ -63,7 +63,7 @@ textbook: Ch. 15
|
|||
<section>
|
||||
<h4 class="slide_title">Merge Sort</h4>
|
||||
|
||||
<p style="font-size: 90%;"><b>Observation:</b> Merging two sorted arrays can be done in $O(1)$.</p>
|
||||
<p style="font-size: 90%;"><b>Observation:</b> Merging two sorted arrays can be done in $O(n)$.</p>
|
||||
<p style="font-size: 90%;"><b>Idea:</b> Split the input in half, sort each half, and merge.</p>
|
||||
</section>
|
||||
|
||||
|
@ -296,7 +296,7 @@ textbook: Ch. 15
|
|||
<p class="fragment">$$c n \log(n) - c n \log(2) + c_1 + c_2 n \leq c n \log(n)$$</p>
|
||||
<p class="fragment">$$c_1 + c_2 n \leq c n \log(2)$$</p>
|
||||
<p class="fragment">$$\frac{c_1}{n \log(2)} + \frac{c_2}{\log(2)} \leq c$$</p>
|
||||
<p class="fragment">True for any $n_0 \geq \frac{\log(2)}{c_1}$ and $c > \frac{c_2}{\log(2)}+1$</p>
|
||||
<p class="fragment">True for any $n_0 \geq \frac{c_1}{\log(2)}$ and $c > \frac{c_2}{\log(2)}+1$</p>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
|
|
Loading…
Reference in New Issue