Rock your next technical interview. Learn about the top three linear data structures—stacks, queues, and deque—and build your own data structures in Python.
Overview
Syllabus
Introduction
- Python data structures primer
- What you should know
- Abstract data types
- Data structures
- Stacks as a linear abstract data type
- Creating the stack class and its methods
- push()
- pop()
- peek()
- size()
- is_empty()
- Challenge: Balanced symbols
- Balanced symbols solution approach
- Balanced symbols solution in code
- Queues as a linear abstract data type
- Creating the queue class and its methods
- enqueue()
- dequeue()
- peek()
- size() and is_empty()
- Challenge: Print queue
- Print queue solution approach
- Print queue solution in code
- Dequeues as a linear abstract data type
- Creating the deque class and its methods
- add_rear() and add_front()
- remove_rear() and remove_front()
- peek_rear() and peek_front()
- size() and is_empty()
- Challenge: Palindrome checker
- Palindrome checker solution approach
- Palindrome checker solution in code
- Next steps
Taught by
Erin Allard