Skip to content

data-structures-master/cs261-deque-template

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

You Don't Know Deques

But after this, you will.

In this assignment, you will engage in a test-driven development process to implement a deque, a FIFO data structure providing O(1) enqueue and dequeue operations from either end of the double-ended queue. We'll call it a "Deque."

Run the Test Suite

python3 -m unittest test_deque

Open both test_deque.py and deque.py in your editor of choice. Modify the implementation in deque.py to pass the first test. Once it passes, create a commit. Then, uncomment the next test, and re-run the test suite. Implement what's necessary to pass the test, and then repeat this process.

But wait!

Toward the middle of the test suite, you should be thinking about the algorithmic efficiency of each operation. Are the enqueue and deque operations all O(1)?

Best Done in Pairs!

Get together with a friend in front of just one machine, and take turns being the driver. Change drivers after each test is passed. Don't forget to commit after each test.

(c) 2019 Yong Joseph Bakos. All rights reserved.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages