diff --git a/sorting/bubble_sort_2.c b/sorting/bubble_sort_2.c index a14b7870..72c6fca6 100644 --- a/sorting/bubble_sort_2.c +++ b/sorting/bubble_sort_2.c @@ -1,9 +1,18 @@ +/** + * @file + * @brief implementation of [Bubble sort](https://en.wikipedia.org/wiki/Bubble_sort) algorithm + * @details + * worst-case: O(n^2) + * best-case: O(n) + * average-complexity: O(n^2) + */ + #include #include -#define MAX 20 - -#include #include +#include + +#define MAX 20 /** * Bubble sort implementation