Skip to content

Instantly share code, notes, and snippets.

Avatar

Krishna Upadhyay kriss-u

View GitHub Profile
View queue.c
#include <stdio.h>
#include <stdlib.h>
// Self-referential Structure
struct queueNode {
char data; // A character data in the queue
struct queueNode *nextPtr; // Pointer to next node
}; // end struct queuNode
typedef struct queueNode QueueNode; // alias for the struct
View stack.c
#include <stdio.h>
#include <stdlib.h>
// Self-referential structure
struct stackNode {
int data; // A integer data in the stack
struct stackNode *nextPtr; // Pointer to next element of stack
}; // end struct stackNode
typedef struct stackNode StackNode; // alias for the struct
View linkedList.c
#include <stdio.h>
#include <stdlib.h>
// Self-referential Structure
struct listNode {
char data; // A character data in the list
struct listNode *nextPtr; // Pointer to next node
}; // end struct listNode
typedef struct listNode ListNode; // alias for the struct
You can’t perform that action at this time.