Bubble Sort
Bubble Sort
Bubble Sort
#include<stdio.h>
#include<conio.h>
void main()
scanf("%d", &n);
scanf("%d", &array[i]);
swap=array[j];
array[j]=array[j+1];
array[j+1]=swap;
}
}
printf("Sorted Array:n");
printf("%dn", array[i]);
getch();
SELECTION SORTING
#include<stdio.h>
#include<conio.h>
void main(){
int size,i,j,temp,list[100];
clrscr();
getch();
}
SELECTION SORT
include <stdio.h>
include<conio.h>
int main()
scanf("%d", &n);
scanf("%d", &a[i]);
for(i = 0; i < n - 1; i++)
position=i;
position=j;
if(position != i)
swap=a[i];
a[i]=a[position];
a[position=swap;
printf("Sorted Array:n");
printf("%dn", a[i]);
return 0;