diff options
| author | Thomas Schmucker <ts@its1.de> | 2024-09-06 21:10:21 +0200 |
|---|---|---|
| committer | Thomas Schmucker <ts@its1.de> | 2024-09-06 21:10:21 +0200 |
| commit | 9e8caf1e06ba7510160305da11a30d91dcfc23e5 (patch) | |
| tree | 30da0c941191d0907abe829feb1bf75f0fca4b3a /src/heap.c | |
| parent | 4ecdad9462c4447c1370cf1dd1341b2289c28566 (diff) | |
| download | data-structures-9e8caf1e06ba7510160305da11a30d91dcfc23e5.tar.gz data-structures-9e8caf1e06ba7510160305da11a30d91dcfc23e5.tar.bz2 data-structures-9e8caf1e06ba7510160305da11a30d91dcfc23e5.zip | |
reformat source code
Diffstat (limited to 'src/heap.c')
| -rw-r--r-- | src/heap.c | 4 |
1 files changed, 2 insertions, 2 deletions
| @@ -277,11 +277,11 @@ main(void) | |||
| 277 | // Kapitel 5.10, Seite 372 ff. | 277 | // Kapitel 5.10, Seite 372 ff. |
| 278 | T heap[20] = { 18, 18, 16, 9, 7, 1, 9, 3, 7, 5 }; | 278 | T heap[20] = { 18, 18, 16, 9, 7, 1, 9, 3, 7, 5 }; |
| 279 | 279 | ||
| 280 | //heapify(heap, 10); | 280 | // heapify(heap, 10); |
| 281 | assert(is_heap(heap, 10)); | 281 | assert(is_heap(heap, 10)); |
| 282 | print_heap(heap, 10); | 282 | print_heap(heap, 10); |
| 283 | 283 | ||
| 284 | //heap[10] = 13; fixup(heap, 10); | 284 | // heap[10] = 13; fixup(heap, 10); |
| 285 | swap(heap, 0, 9); | 285 | swap(heap, 0, 9); |
| 286 | fixdown(heap, 0, 9); | 286 | fixdown(heap, 0, 9); |
| 287 | 287 | ||
