Skip to content

Commit 1b9fd1e

Browse files
committed
Update comment for push_heap.
1 parent cc8f337 commit 1b9fd1e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

STL_examples.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -822,11 +822,11 @@ TEST(make_heap, ExampleOne) {
822822
}
823823

824824
TEST(push_heap, ExampleOne) {
825-
// Constructs a max heap.
826825
std::vector<int> v{1,2,3,4,5,6,5,4};
827826
std::make_heap(v.begin(), v.end());
828827

829828
v.push_back(9);
829+
// Pushes 9 onto the heap while maintaining max heap conditions.
830830
std::push_heap(v.begin(), v.end());
831831

832832
const std::vector<int> expected_heap{9,6,5,5,2,3,1,4,4};

0 commit comments

Comments
 (0)