From 5bbc0e54941060fa118956ac0bee417e6ea66963 Mon Sep 17 00:00:00 2001 From: Desislava Shunina <115353472+desiish@users.noreply.github.com> Date: Tue, 3 Dec 2024 17:57:44 +0200 Subject: Update readme.md --- Practicum/pract09/readme.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'Practicum/pract09') diff --git a/Practicum/pract09/readme.md b/Practicum/pract09/readme.md index ea04332..3a760cd 100644 --- a/Practicum/pract09/readme.md +++ b/Practicum/pract09/readme.md @@ -53,7 +53,7 @@ void heapify(RandomIt first, size_t rootIdx, size_t size, Compare comp) { template > void make_heap(RandomIt first, RandomIt last, Compare comp = Compare()) { - size_t size = last - first; + size_t size = last - first; // should use std::dist for when its not vector for (int i = size / 2; i >= 0; --i) heapify(first, i, size, comp); @@ -74,7 +74,7 @@ void bubble_up(RandomIt first, size_t index, Compare comp) { template > void push_heap(RandomIt first, RandomIt last, Compare comp = Compare()) { - size_t size = last - first; + size_t size = last - first; // should use std::dist for when its not vector if (size > 1) bubble_up(first, size - 1, comp); @@ -82,7 +82,7 @@ void push_heap(RandomIt first, RandomIt last, Compare comp = Compare()) { template > void pop_heap(RandomIt first, RandomIt last, Compare comp = Compare()) { - size_t size = last - first; + size_t size = last - first; // should use std::dist for when its not vector if (size > 1) { std::swap(*first, *(last - 1)); @@ -92,7 +92,7 @@ void pop_heap(RandomIt first, RandomIt last, Compare comp = Compare()) { template > bool is_heap(RandomIt first, RandomIt last, Compare comp = Compare()) { - size_t size = last - first; + size_t size = last - first; // should usestd:: dist for when its not vector for (size_t i = 0; i < size / 2; ++i) { size_t leftChild = 2 * i + 1; -- cgit v1.3.1-23-gd82d