Algorithms_in_C
1.0.0
Set of algorithms implemented in C.
|
Bubble sort algorithm implementation More...
#include <assert.h>
#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
Functions | |
void | display (const int *arr, int n) |
Display elements of array. More... | |
void | swap (int *first, int *second) |
Swap two values by using pointer. More... | |
void | bubbleSort (int *arr, int size) |
Bubble sort algorithm implementation. More... | |
void | test () |
Test function. | |
int | main (int argc, const char *argv[]) |
Driver Code. | |
Bubble sort algorithm implementation
void bubbleSort | ( | int * | arr, |
int | size | ||
) |
Bubble sort algorithm implementation.
arr | array to be sorted |
size | size of array |
void display | ( | const int * | arr, |
int | n | ||
) |