diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 90541dc..ff30226 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -6,3 +6,5 @@ ### Shreyans Jain - Github: https://github.com/Shreyans13 +### Jathin Prakash +- Github: https://github.com/SLICKjp diff --git a/Data Structure/bubblesort.c b/Data Structure/bubblesort.c new file mode 100644 index 0000000..2b8fa20 --- /dev/null +++ b/Data Structure/bubblesort.c @@ -0,0 +1,31 @@ +#include + +int main(){ + + int count, temp, i, j, number[30]; + + printf("How many numbers are u going to enter?: "); + scanf("%d",&count); + + printf("Enter %d numbers: ",count); + + for(i=0;i=0;i--){ + for(j=0;j<=i;j++){ + if(number[j]>number[j+1]){ + temp=number[j]; + number[j]=number[j+1]; + number[j+1]=temp; + } + } + } + + printf("Sorted elements: "); + for(i=0;i +void main() + +{ + int i,j,n,temp,a[20]; + printf("Enter the size of the array"); + scanf("%d",&n); + printf("Enter the elements of array"); + for(i=0;i=0)){ + a[j+1]=a[j]; + j=j-1; + } + a[j+1]=temp; + } + + printf("Order of Sorted elements: "); + for(i=0;i +void quicksort(int number[25],int first,int last){ + int i, j, pivot, temp; + + if(firstnumber[pivot]) + j--; + if(i