3
answers
1
watching
881
views

Problem 1:
Alice is rearranging her library. She takes the innermost shelf and reverses the order of books. If you want to automate this process, which data structure would you prefer to do this and why? 

Problem 2:
There are two persons A and B. Both are maintaining two book shelves. A takes the first book (the book he kept for the first time in the shelf) from the shelf and reads it. B prefers to take the last book and reads. After reading a book, both A and B keep the book in a separate shelf. Write a Python program to implement this process. Identify the data structures and define the operations accordingly.

For unlimited access to Homework Help, a Homework+ subscription is required.

Avatar image
Liked by kajalrai and 3 others

Unlock all answers

Get 1 free homework help answer.
Already have an account? Log in
Avatar image
Read by 1 person
Already have an account? Log in
Avatar image
Read by 11 people
Already have an account? Log in
Start filling in the gaps now
Log in