3
answers
1
watching
881
views
mirraLv1
8 Nov 2021
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.
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.
Liked by kajalrai and 3 others
suandrip3827Lv10
21 Nov 2021
Read by 1 person
10 Jul 2023
Already have an account? Log in
Read by 11 people
8 Nov 2021
Already have an account? Log in