From a56e54ca15249a322d2dd98ab83652c20e0753f1 Mon Sep 17 00:00:00 2001 From: github-actions <${GITHUB_ACTOR}@users.noreply.github.com> Date: Sun, 21 Jun 2020 12:09:45 +0000 Subject: [PATCH] formatting source-code for 7c8617fa46d41481c68ae2ae9d4f6a89ca42a4ff --- sorting/heap_sort.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/sorting/heap_sort.cpp b/sorting/heap_sort.cpp index 0945c9a92..52edddf17 100644 --- a/sorting/heap_sort.cpp +++ b/sorting/heap_sort.cpp @@ -22,9 +22,9 @@ * Time Complexity - O(nlog(n)) * */ -#include #include #include +#include /** * @@ -97,7 +97,7 @@ void test() { printArray(arr, sz); // displaying the array before sorting heapSort(arr, sz); // calling heapsort to sort the array printArray(arr, sz); // display array after sorting - assert(std::is_sorted(arr, arr+sz)); + assert(std::is_sorted(arr, arr + sz)); std::cout << "Test 1 Passed\n========================\n"; std::cout << "Test 2\n"; double arr2[] = {4.5, -3.6, 7.6, 0, 12.9}; @@ -105,13 +105,13 @@ void test() { printArray(arr2, sz); heapSort(arr2, sz); printArray(arr2, sz); - assert(std::is_sorted(arr2, arr2+sz)); + assert(std::is_sorted(arr2, arr2 + sz)); std::cout << "Test 2 passed\n"; } /** Main function */ int main() { - test(); - return 0; + test(); + return 0; } /** @} */