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 QUEUE_SIZE 100 | |
| #define STACK_SIZE 100 | |
| #define MAX_CONN 8 | |
| int queue[QUEUE_SIZE]; | |
| int front = -1, rear = -1; | |
| int stack[STACK_SIZE]; |
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 10 | |
| typedef struct Node { | |
| int data; | |
| struct Node *next; | |
| } 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> | |
| typedef struct Node { | |
| int data; | |
| struct Node *left, *right; | |
| } Node; | |
| Node* createNode(int data) { | |
| Node* n = (Node*)calloc(1, sizeof(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 <ctype.h> | |
| #include <math.h> | |
| #define MAX_SIZE 100 | |
| typedef struct Stack { | |
| int arr[MAX_SIZE]; | |
| int top; |
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 Stack { | |
| int arr[MAX_SIZE]; | |
| int top; | |
| } Stack; |
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 *next; | |
| } Node; | |
| void push(Node **head, int data); | |
| int pop(Node **head); |
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 *next; | |
| struct Node *prev; | |
| } Node; | |
| void insert_end(Node **head, int data); |
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 *next; | |
| } Node; | |
| void insert_end(Node **head, int data); | |
| void insert_begin(Node **head, int data); |
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 *next; | |
| } Node; | |
| Node* init(); | |
| void insert_end(Node *head, int data); |
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> // this is for calloc | |
| typedef struct node { | |
| int x,y; | |
| struct node *next; | |
| } Node; | |
| int main() { | |
| /* |
NewerOlder