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> | |
#include "numbers.h" // https://gist.github.com/911872 | |
void selectionSort(struct numbers*); | |
void numberSwap(struct numbers*, int, int ); | |
int main() | |
{ | |
struct numbers myNumbers = generateRandoms(2,200); | |
int 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
#include <stdio.h> | |
#include "numbers.h" | |
void insertionSort(struct numbers*); | |
int main() | |
{ | |
struct numbers myNumbers = generateRandoms(1,10); | |
int i; | |
for (i = 0; i < myNumbers.size; 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
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include "numbers.h" //https://gist.github.com/911872 | |
void insert(int,int); | |
int hremove(void); | |
int hEmpty(void); | |
void swapsies(int*, int, int); //anandkunal knows | |
int *indirectHeapSort(struct numbers*); //heapsort conflicts with stdlib |
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> | |
#include "numbers.h" // https://gist.github.com/911872 | |
int main() | |
{ | |
struct numbers a; | |
struct numbers b; | |
/* | |
I feel like a tool, sort of. I spent more time than I should admit using | |
generateRandoms here, forgetting that mergesort can only merge two arrays |
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 <stdlib.h> | |
#include <stdio.h> | |
#include "numbers.h" // https://gist.github.com/911872 | |
struct Pair | |
{ | |
int left; | |
int right; | |
}; | |
struct Pairs |
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> | |
#include <stdlib.h> | |
#include "numbers.h" // https://gist.github.com/911872 | |
struct node { | |
int key; | |
struct node *l; | |
struct node *r; | |
}; |
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> | |
#include <stdlib.h> | |
#include <string.h> | |
#define MAXLINE 1000 | |
int main(int argc, char *argv[]) | |
{ | |
FILE *fileA, *fileB; | |
char filenameA[257]; | |
char filenameB[257]; | |
char *prog = argv[0]; |
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> | |
#include <string.h> | |
#include <stdlib.h> | |
int brutesearch(char *p, char *a) | |
{ | |
int i, j, M = strlen(p), N = strlen(a); | |
for (i = 0, j = 0; j < M && i < N; i++, j++) | |
{ | |
if (a[i] != p[j]) |
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> | |
#include <stdlib.h> | |
#include <limits.h> | |
char *itob(char *buffer, int x) | |
{ | |
unsigned int z = INT_MAX + 1U; | |
char *buf = buffer; | |
do |
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
/* | |
* gcc nv3h_read_gz.c -shared -Bsymbolic -I/zshare/rsi/idl_6.3/external/include -L/zshare/rsi/idl_6.3/bin/bin.linux.x86_64 -lidl -o nv3h_read_gz.so -fPIC -lz -ldl | |
* | |
* requires zlib 1.2.5 for gzbuffer -- will check for right version | |
*/ | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <sys/stat.h> | |
#include <zlib.h> |