This file contains hidden or 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 implementation in C */ | |
#include<stdio.h> | |
/* swapping two elements by reference */ | |
void swap(int *a,int *b) | |
{ | |
int temp; | |
temp = *a; | |
*a = *b; | |
*b = temp; |
This file contains hidden or 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
/* insertion sort implementation in C */ | |
#include<stdio.h> | |
/* swapping two elements by reference */ | |
void swap(int *a,int *b) | |
{ | |
int temp; | |
temp = *a; | |
*a = *b; | |
*b = temp; |
This file contains hidden or 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
#include<stdio.h> | |
/*copy two arrays*/ | |
void copyArray(int readFrom[], int begin, int end, int writeTo[]) | |
{ | |
int i=0,j=begin; | |
while(i<end-begin+1) | |
{ | |
writeTo[i] = readFrom[j]; | |
i++; |
This file contains hidden or 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
/* Implementaion of quicksort in C*/ | |
#include<stdio.h> | |
/*swap two elements*/ | |
void swap(int *a,int *b) | |
{ | |
int temp; | |
temp = *a; | |
*a = *b; | |
*b = temp; |
This file contains hidden or 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 problem solution in C*/ | |
#include<stdio.h> | |
/*swap two elements*/ | |
void swap(int *a,int *b) | |
{ | |
int temp; | |
temp = *a; | |
*a = *b; | |
*b = temp; |
OlderNewer