This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// Selection Sort /// | |
#include<stdio.h> | |
main() | |
{ | |
int a[100],i,j,minIndex,temp,n; | |
printf("Enter How many elements on your Array :"); | |
scanf("%d",&n); | |
printf("\nEnter %d values :",n); | |
for(i=0;i<n;i++) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// Bubble sort /// | |
#include<stdio.h> | |
main() | |
{ | |
int a[100],i,p,n,temp; | |
printf("Enter how many elements for your Array:"); | |
scanf("%d",&n); | |
printf("\nEnter %d values :",n); | |
for(i=0;i<n;i++) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Circular Queue Implementation in C using Array ! | |
#include<stdio.h> | |
#include<stdlib.h> //header file for using return and exit function | |
#define max 5 //symbolic constant | |
int front=-1,rear=-1; // global variable | |
int CQueue[max]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Queue Implementation In C Using Array ! | |
#include<stdio.h> | |
#include<stdlib.h> // hearder for for using exit and return function | |
#define max 5 // symbolic constant | |
int rear=-1,front=-1; // global variable | |
int queue[max]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Stack implementation in C using Array. | |
#include<stdio.h> | |
#include<stdlib.h> // header file for exit and return function | |
#define max 5 | |
int stack[max],top=-1; // global variable | |
void push(); | |
int pop(); |
NewerOlder