Access over 35 million academic & study documents

ADT Queue, Stack, Sorted List, Unsorted List Please answer correc

Content type
User Generated
Rating
Showing Page:
1/2
ADT: Queue, Stack, Sorted List, Unsorted List.
Please answer correctly and explain precisely.
Language: C++ Suppose you write a program that will
manipulate thousands of records, each comprising product
name, type, serial number, retail price, etc. In each case
below, explain which Abstract Data Type (studied in class)
you would use, and which implementation (array or linked
structure). Briefly justify your choices. Records will be
retrieved in the same order they were stored. There is no
telling in advance how many records will be processed and
how. (2 marks) All records will be inserted at the
beginning, once and in no particular order. They will be
retrieved very frequently, based on serial number. A large
but unknown number of product records will be inserted, as
and when needed. They will seldom be retrieved
individually. Most operations will consist of processing all
records at one go e.g., printing all.
Solution
Yes, for question a) we can also use Queue since queue
implements as the order of deleting the values in which
they are placed But considering all the above three
questions, Unsorted List are used which satisfies the
above conditions Here I answered based on all the above
three conditions.... As you asked we can use Queue in
case of a) yes we can use based on its definition it

Sign up to view the full document!

lock_open Sign Up
Showing Page:
2/2

Sign up to view the full document!

lock_open Sign Up
Unformatted Attachment Preview
ADT: Queue, Stack, Sorted List, Unsorted List. Please answer correctly and explain precisely. Language: C++ Suppose you write a program that will manipulate thousands of records, each comprising product name, type, serial number, retail price, etc. In each case below, explain which Abstract Data Type (studied in class) you would use, and which implementation (array or linked structure). Briefly justify your choices. Records will be retrieved in the same order they were stored. There is no telling in advance how many records will be processed and how. (2 marks) All records will be inserted at t ...
Purchase document to see full attachment
User generated content is uploaded by users for the purposes of learning and should be used following Studypool's honor code & terms of service.

Anonymous
I was stuck on this subject and a friend recommended Studypool. I'm so glad I checked it out!

Studypool
4.7
Indeed
4.5
Sitejabber
4.4