Doctor of Science in Information Technology (DScIT) Repository
Sch
o
ol of Computing
Applied AI
News
Events
Careers
Resources
Faculty
Projects
Repository
Learn
Python
HTML
JavaScript
XML
PHP
MATH
Applied AI
News
Events
Careers
Resources
Faculty
Projects
Repository
Learn
Python
HTML
JavaScript
XML
PHP
MATH
Editor
Editing — 17. Stacks and Queues
Learning Objectives
Understand the concept of a stack data structure and its fundamental properties.
Learn how to implement a stack in Python using built-in data structures like lists or arrays.
Explore the basic operations of a stack: push (adding an item), pop (removing the top item), peek (viewing the top item without removal), and isEmpty (checking if the stack is empty).
Understand the concept of a queue data structure and its fundamental properties.
Learn how to implement a queue in Python using built-in data.
Explore the basic operations of a queue: enqueue (adding an item), dequeue (removing the front item), peek (viewing the front item without removal), and isEmpty (checking if the queue is empty).
Understand the concept of a priority queue data structure and its fundamental properties.
Learn how to implement a priority queue in Python using built-in data structures like list, heapq module, and priority queue implementations.
Understand the concept of a deque (double-ended queue) data structure and its fundamental properties.
Learn how to implement a deque in Python using the built-in collections.deque class.
Explore the basic operations of a deque: adding and removing elements from both ends (front and rear), peeking at elements without removal, and checking if the deque is empty.