mirror of
https://github.com/TheAlgorithms/C
synced 2024-11-22 05:21:49 +03:00
Merge pull request #319 from shivamagarwal1999/patch-2
Update BubbleSort.c
This commit is contained in:
commit
e2d3675bc7
@ -29,7 +29,7 @@ void swap(int *first, int *second){
|
||||
void bubbleSort(int arr[], int size){
|
||||
|
||||
for(int i=0; i<size-1; i++) {
|
||||
for(int j=0; j<size-1; j++) {
|
||||
for(int j=0; j<size-1-i; j++) {
|
||||
if(arr[j]>arr[j+1]) {
|
||||
swap(&arr[j], &arr[j+1]);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user