A heap sorted by levels is a heap which:
Every parent is smaller than its children.
The nodes in each level are sorted from the smallest to the greatest.
I need to describe an algorithm with $O(n)$ runtime that prints the values in the heap in sorted order.
I only manage to do it in $O(n \log(\log n))$ using another heap but have no idea of how to do it in $O(n)$.