Conversation
task_04/src/heap.hpp
Outdated
| template <constructable CustomType, comparing<CustomType> Function> | ||
| Heap<CustomType, Function>::Heap( | ||
| std::function<bool(const CustomType&, const CustomType&)> | ||
| comparing_function_) |
There was a problem hiding this comment.
по код стайлу обычно если в конце переменной _ то это переменная из private. но можно и так ещё сделать:
Heap<CustomType, Function>::Heap(std::function<...> comparing_function)`: data{}, heap_size{0}, comparing_function(comparing_function) {}
There was a problem hiding this comment.
если выше исправишь, то и тут будет карсиво comparing_function_(comparing_function)
task_05/src/sort.hpp
Outdated
| // where n - length of first array, m - length of second array | ||
| template <typename CustomType, comparing<CustomType> Function = std::function< | ||
| bool(const CustomType&, const CustomType&)>> | ||
| void merge_two_sorted_arrays( |
task_05/src/sort.hpp
Outdated
| // time complexity - O(nlogn) where n - length of an array | ||
| template <typename CustomType, comparing<CustomType> Function = std::function< | ||
| bool(const CustomType&, const CustomType&)>> | ||
| void merge_sort( |
There was a problem hiding this comment.
давай добавим тест с монетами {1,2,5,7,10} и разменом 14
task_04/src/heap.hpp
Outdated
| void SiftUp(size_t index); | ||
| size_t heap_size; | ||
|
|
||
| std::function<bool(const CustomType&, const CustomType&)> comparing_function; |
There was a problem hiding this comment.
кажется нужно эти поля в private отправить, ну и имя comparing_function_ как приватное поле
There was a problem hiding this comment.
Так они и так в private находится
There was a problem hiding this comment.
я про то что на конце имени "_" поставить
task_04/src/heap.hpp
Outdated
| template <constructable CustomType, comparing<CustomType> Function> | ||
| Heap<CustomType, Function>::Heap( | ||
| std::function<bool(const CustomType&, const CustomType&)> | ||
| comparing_function_) |
There was a problem hiding this comment.
если выше исправишь, то и тут будет карсиво comparing_function_(comparing_function)
sandbox/template/src/main
Outdated
There was a problem hiding this comment.
удали лишний файл из ПРа)
Task_02, Task_03, ... Task_09