summaryrefslogtreecommitdiff
path: root/rushs/evalexpr/bubble_sort
diff options
context:
space:
mode:
Diffstat (limited to 'rushs/evalexpr/bubble_sort')
-rw-r--r--rushs/evalexpr/bubble_sort/bubble_sort.c25
-rw-r--r--rushs/evalexpr/bubble_sort/bubble_sort.h8
2 files changed, 0 insertions, 33 deletions
diff --git a/rushs/evalexpr/bubble_sort/bubble_sort.c b/rushs/evalexpr/bubble_sort/bubble_sort.c
deleted file mode 100644
index 13d2ba3..0000000
--- a/rushs/evalexpr/bubble_sort/bubble_sort.c
+++ /dev/null
@@ -1,25 +0,0 @@
-#include "bubble_sort.h"
-
-void bubble_sort(int array[], size_t size)
-{
- if (!array || size == 0)
- {
- return;
- }
-
- int mod;
- do
- {
- mod = 0;
- for (size_t i = 0; i < size - 1; i++)
- {
- if (array[i] > array[i + 1])
- {
- mod = 1;
- int tmp = array[i];
- array[i] = array[i + 1];
- array[i + 1] = tmp;
- }
- }
- } while (mod);
-}
diff --git a/rushs/evalexpr/bubble_sort/bubble_sort.h b/rushs/evalexpr/bubble_sort/bubble_sort.h
deleted file mode 100644
index a33d531..0000000
--- a/rushs/evalexpr/bubble_sort/bubble_sort.h
+++ /dev/null
@@ -1,8 +0,0 @@
-#ifndef BUBBLE_SORT_H
-#define BUBBLE_SORT_H
-
-#include <stddef.h>
-
-void bubble_sort(int array[], size_t size);
-
-#endif /* !BUBBLE_SORT_H */