Put your new knowledge of deques to use with this practice interview question. Create three classes total, one of which is a queue class, to simulate how a printer can obtain a job from a print queue.
- [Instructor] Let's practice some problem-solving…using the deque data structure.…The prompt for this challenge is to use…a deque data structure and write a function…that takes in an input string.…The function should return true…if the string is a palindrome…or false if the string is not a palindrome.…As a reminder, a palindrome is a word that is spelled…the same backwards and forwards.…Some examples would be mom, level, and kayak.…So give this a try,…and I'll come back and show you how I approached it.…
- Abstract types and data structures
- Stacks as a linear abstract data type
- Creating the Stack class and its methods
- Adding items to the top and bottom of a stack
- Creating the Queue class and its methods
- Manipulating items in a queue
- Creating the Dequeue class and its methods
- Adding and removing items from a dequeue
Skill Level Advanced
Learning the Python 3 Standard Librarywith Kathryn Hodge2h 9m Intermediate
What you should know1m 26s
1. Abstract Data Types and Data Structures
2. The Stack
3. The Queue
4. The Deque
Next steps1m 43s
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.