Question: (PYTHON) Generate a sequence of enqueues and dequeues to test your two queue implementations. To generate the test sequence, randomly enqueue and dequeuestrings from words.txt(https://raw.githubusercontent.com/gsprint23/cpts215/master/microassignments/files/words.txt),

(PYTHON)

Generate a sequence of enqueues and dequeues to test your two queue implementations. To generate the test sequence, randomly enqueue and dequeuestrings from words.txt(https://raw.githubusercontent.com/gsprint23/cpts215/master/microassignments/files/words.txt), a file containing all 118,309 valid crossword puzzle words, one on each line. Evaluate the differences between the two implementations by performing the following:

Using timeit(), compare the running time for each queue implementation operating on your test sequence. Vary the size of your test sequence.

Note: Make sure you are using the same test sequence for each implementation! Also, remove all frivolous code from your implementations (e.g. print()statements), as these can affect the timing!

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!