diff --git a/sorting/bubble_sort.cpp b/sorting/bubble_sort.cpp index 9209f8664e7..cca081813b3 100644 --- a/sorting/bubble_sort.cpp +++ b/sorting/bubble_sort.cpp @@ -93,6 +93,11 @@ std::vector bubble_sort(std::vector& array) { * @brief Self-test implementation * @return void */ +// Example: +// Input: 5 1 4 2 8 +// Output: 1 2 4 5 8 + + static void test() { std::vector vec_1 = {3, 1, -9, 0}; std::vector sorted_1 = sorting::bubble_sort::bubble_sort(vec_1);