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
| https://tinyurl.com/stringarithmetic | |
| https://tinyurl.com/famousstring | |
| https://tinyurl.com/famousstringtwo | |
| https://tinyurl.com/sparsematrixaritro | |
| https://tinyurl.com/upperlowersparse | |
| https://tinyurl.com/insertionselectionsort | |
| https://tinyurl.com/avltreeass | |
| https://tinyurl.com/threadedbinarytree | |
| https://tinyurl.com/priorityqass | |
| https://tinyurl.com/circularqueueass |
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> | |
| #define MAX 100 | |
| void generate(int input[], int n, int in, | |
| int stack[], int top, | |
| int output[], int out) { | |
| //if input and stack empty we reached base case | |
| if (in == n && top == -1) { |
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> | |
| #define MAX_SIZE 100 | |
| typedef struct { | |
| int buffer[MAX_SIZE]; | |
| int top; | |
| } stack; | |
| void init(stack* s) { |
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> | |
| struct node_t | |
| { | |
| char *word; | |
| struct node_t *left; | |
| struct node_t *right; | |
| }; | |
| struct node_t *create_node(char *new_word) |
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 <time.h> | |
| #include <string.h> | |
| #define MAX_N 10000 | |
| typedef struct Node { | |
| int data; | |
| struct Node *next; |
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 <math.h> | |
| #define MAX_SIZE 15 | |
| typedef struct | |
| { | |
| int data[MAX_SIZE]; | |
| int top; | |
| } stack_t; | |
| void initialize_stack(stack_t *s); |
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> | |
| typedef struct node | |
| { | |
| int data; | |
| struct node *left; | |
| struct node *right; | |
| } Node; |
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<stdbool.h> | |
| #define SIZE 10001 | |
| int M; | |
| //hash func as discussed in class | |
| int h_k(int k) { | |
| return k % M; |
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<time.h> | |
| int partition(int* a, int p, int r) { | |
| int x = a[p]; | |
| int i = p; | |
| for(int j = p + 1; j < r; j++) { | |
| if(a[j] <= x) { | |
| 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> | |
| #define MAXSIZE 100 | |
| typedef struct { | |
| int arr[MAXSIZE]; | |
| int top; | |
| } stack; | |
| typedef struct { | |
| int front; | |
| int rear; |
NewerOlder