Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion chapters/03_algorithms_15_heap.tex
Original file line number Diff line number Diff line change
Expand Up @@ -90,4 +90,4 @@ \subsection{Comparison with \texorpdfstring{\cpp{std::priority_queue}}{\texttt{s
\cppfile{code_examples/extras/priority_queue_heap_code.h}
\end{codebox}

When using the heap algorithms, we need to manually manage the underlying data structure (lines 9-10 and 13–14). However, we do not need to extract the data, and on top of that, we could omit the final \cpp{std::sort_heap} (line 20) if we do not need the top k elements in sorted order.
When using the heap algorithms, we need to manually manage the underlying data structure (lines 9-10 and 13–14). However, we do not need to extract the data, and on top of that, we could omit the final \cpp{std::ranges::sort_heap} (line 20) if we do not need the top k elements in sorted order.