Data Structure Stack and Queue
Data Structure Stack and Queue
S. No. Topics
1 Stack
3 Queue
Page 1 of 9
Unit I: Computational Thinking and Programming - 2
Page 2 of 9
Unit I: Computational Thinking and Programming - 2
Page 3 of 9
Unit I: Computational Thinking and Programming - 2
Page 4 of 9
Unit I: Computational Thinking and Programming - 2
QUEUE OPERATIONS:
Peek : getting first value of QUEUE i.e. of FRONT position.
Queue[Front] # Front is an int storing index of first element of queue
Enqueue: addition of new item in QUEUE at REAR position.
e.g. Queue. append(Item)
Dequeue: removal of item from the beginning of QUEUE.
e.g. Queue.pop(0)
Page 6 of 9
Unit I: Computational Thinking and Programming - 2
Page 7 of 9
Unit I: Computational Thinking and Programming - 2
Page 8 of 9
Unit I: Computational Thinking and Programming - 2