Starting from:

$35

Homework 05 METU CENG310


Homework 05
METU CENG310 Data Structures and Algorithms with Python

1 Questions from the Textbook
Task-1: Solve the questions R-6.8, R-6.9 from the textbook.
Task-2: Write a clear pseudo code for C-6.27 from the textbook. Show that your algorithm is O(n).
Task-3: Assume that there is a queue class, namely WeirdQueue, that implements queue ADT and internally
uses two stack objects, namely S1 and S2 instead of an array. (Please recall that we have implemented queue
ADT by making use of an array which is internally maintained.) Provide two separate pseudo codes for the
enqueue(e) and dequeue() operations of WeirdQueue.
2 Instructions
Pertaining to the answers of this homework, correct typing of superscripts (e.g., n
2
) and subscripts (e.g., n0)
matters. Due to this reason, this homework may be done on paper and returned as a PDF file containing
the answer sheet captures (photos, scanned files). If you would like you can use MS Word or Latex, but your
deliverable has to be a single PDF file. PDF file should be created so that the answers appears in the same
order as the questions shown in the homework assignment document.
A Homework-05 page will be generated soon after the start date of this homework. All deliveries should
be done over ODTUClass. Please also be aware of the late penalties (Please check the Announcements –
Homework and Assignment Policy in ODTUClass if you have not already done so.). Should you have any
questions pertaining to homework tasks, please ask them in advance (not on the due date) for your own
convenience.
1

More products