-
-
Notifications
You must be signed in to change notification settings - Fork 0
Algo
Mehul Prajapati edited this page Sep 9, 2021
·
1 revision
- Insert
- Delete
- Update
- Search
int num[100];
typedef struct node {
int n;
struct node *next;
} node;
#define MAX_NUM_ALPHA 26
#define LENGTH 32
typedef struct alpha
{
char word[LENGTH];
struct alpha *pNext;
}
node;
// Hash Table (Chaining using linked-list)
node *pTable[MAX_NUM_ALPHA] = { NULL };
typedef struct node {
int n;
struct node *left;
struct node *right;
} node;
typedef struct {
int *numbers;
int size;
} stack;
- Push
- Pop
typeded struct {
int front;
int *numbers;
int size;
} queue;
- Enqueue
- Dequeue
A stack and queue are both abstract data types, where we can implement them in any number of different ways but expect the same properties and operations.