Iurii Tatishchev cc06e5fbdb
10.8 Lab: Heap - Display Heap as an Indented List
Change the previous lab to display a min-heap as an indented list (level numbers included). In order to do this you will have to add two new member functions to the heap class

- void _printIndented(int index, void visit(int, int)); // A
- void printIndented(void visit(int, int)); // B

Note: One function would be sufficient(A). However, to make the call simpler, a wrapper function (B) has been added (to "hide" the root of the heap).

Another solution is to add level as a parameter to _printIndented:

- void _printIndented(int index, int level, void visit(int, int));
2024-05-28 18:59:23 -07:00
2024-04-28 11:54:46 -07:00
2024-05-11 16:44:34 -07:00
2024-04-28 11:54:46 -07:00
Description
No description provided
165 KiB
Languages
C++ 99%
CMake 1%