Class Central is learner-supported. When you buy through links on our site, we may earn an affiliate commission.

LinkedIn Learning

Python Data Structures: Stacks, Queues, and Deques

via LinkedIn Learning

Overview

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.

Syllabus

Introduction
  • Python data structures primer
  • What you should know
1. Abstract Data Types and Data Structures
  • Abstract data types
  • Data structures
2. The Stack
  • 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
3. The Queue
  • 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
4. The Deque
  • 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
Conclusion
  • Next steps

Taught by

Erin Allard

Reviews

4.7 rating at LinkedIn Learning based on 146 ratings

Start your review of Python Data Structures: Stacks, Queues, and Deques

Never Stop Learning.

Get personalized course recommendations, track subjects and courses with reminders, and more.

Someone learning on their laptop while sitting on the floor.