Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
|
aa:lab:14 [2021/01/22 09:04] pdmatei |
aa:lab:14 [2021/01/24 15:10] (current) roxana_elena.stiuca fixed number of nodes in complete binary tree |
||
|---|---|---|---|
| Line 12: | Line 12: | ||
| 2. $math[\forall t \in \texttt{Tree}. flatten(mirror(t)) = reverse(flatten(t))] | 2. $math[\forall t \in \texttt{Tree}. flatten(mirror(t)) = reverse(flatten(t))] | ||
| - | Find a proper formulation and prove the following properties | + | Find a proper formulation and prove the following properties: |
| + | |||
| + | 1. Merging (using the strategy from ''Mergesort'') two sorted lists produces a sorted list. | ||
| + | |||
| + | 2. A complete binary tree always has $math[2^{height(t)}-1] nodes. | ||