Professional Documents
Culture Documents
I. Link List:
struct node
{
int data;
struct node *next;
};
Create(&sptr); Create(sptr);
} }
1
II. Recursion:
2
III. Doubly Link List:
struct node
{ sptr
int data;
struct node *next;
struct node *prev; 1 2 3
};
In a circular link list the next of the last inserted node must point
to the first node.
tail
1 2 3
3
V. Stack:
stack
1 2 3
Algorithm:
c
abc-* b-c a*(b-c)
b b-c
a a ans
4
Stack using arrays:
VI. Queue:
head tail
1 2 3