From d9bb81ce18bbc3123a90e1f32ed291e9d5f5409b Mon Sep 17 00:00:00 2001 From: github-actions <${GITHUB_ACTOR}@users.noreply.github.com> Date: Tue, 6 Jul 2021 03:44:19 +0000 Subject: [PATCH] clang-format and clang-tidy fixes for 2601c621 --- sorting/cycle_sort.cpp | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/sorting/cycle_sort.cpp b/sorting/cycle_sort.cpp index fdd157292..23bb1e18c 100644 --- a/sorting/cycle_sort.cpp +++ b/sorting/cycle_sort.cpp @@ -1,8 +1,13 @@ /** * @file - * @brief Implementation of [Cycle sort](https://en.wikipedia.org/wiki/Cycle_sort) algorithm + * @brief Implementation of [Cycle + * sort](https://en.wikipedia.org/wiki/Cycle_sort) algorithm * @details - * Cycle Sort is a sorting algorithm that works in \f$O(n^2)\f$ time in best case and works in \f$O(n^2)\f$ in worst case. If a element is already at its correct position, do nothing. If a element is not at its correct position, we then need to move it to its correct position by computing the correct positions.Therefore, we should make sure the duplicate elements. + * Cycle Sort is a sorting algorithm that works in \f$O(n^2)\f$ time in best + * case and works in \f$O(n^2)\f$ in worst case. If a element is already at its + * correct position, do nothing. If a element is not at its correct position, + * we then need to move it to its correct position by computing the correct + * positions.Therefore, we should make sure the duplicate elements. * @author [TsungHan Ho](https://github.com/dalaoqi) */ @@ -18,7 +23,8 @@ namespace sorting { /** * @namespace cycle_sort - * @brief Functions for [Cycle sort](https://en.wikipedia.org/wiki/Cycle_sort) algorithm + * @brief Functions for [Cycle sort](https://en.wikipedia.org/wiki/Cycle_sort) + * algorithm */ namespace cycle_sort { /** @@ -98,7 +104,7 @@ static void test() { assert(std::is_sorted(std::begin(arr2), std::end(arr2))); std::cout << "passed" << std::endl; - // Test 3 + // Test 3 // [3, 3, 3, 3] return [3, 3, 3, 3] std::vector array3 = {3, 3, 3, 3}; std::cout << "Test 3... ";