Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Suppose you have been asked to implement software solutions for each of the appl

ID: 3585177 • Letter: S

Question

Suppose you have been asked to implement software solutions for each of the applications listed below. For each application, indicate which data type (List, Set, Map, Stack, Queue, Priority Queue) would be most effective in solving the problem.

a. A compiler that uses a symbol table which stores the name, type, size, and location of each variable in a program.

b. A photo management application that allows you to create and edit slideshows that display a collection of photos in the order you want.

c. A barber shop where customers can pay a higher price for faster service.

d. A process scheduler for an operating system that runs jobs using a first-come-first-served rule.

Explanation / Answer

Please find below the required answers. do let me know ifu have any doubts,,will helping you u out...

a. A compiler that uses a symbol table which stores the name, type, size, and location of each variable in a program.

Map data structure will be efficient mapping name, type, size, and location of each variable in a program.
it have ability to store the value in kay value pair. Insertin and deletion is also efiifcient in order to any modification in symbol tmple.
it also calaculates hash for each entries.

b. A photo management application that allows you to create and edit slideshows that display a collection of photos in the order you want.

List data structure will be suffice the need.
It dont have any sorting mechanism in built and data that is inserted not got sorted remains same order as you inserted.
And accessing the data is quite efficient in list index based so photographer can choose either of data for editing.
And list supports multiple sorting algo like inserttion sort, binary sort, merger sort, heap sort and much more.
so photographer can perform the sorting og collection as he wants.It is type od sequentially data structure.

c. A barber shop where customers can pay a higher price for faster service.

Priority Queue will efficient for barber shop whom have to server Priority services.
It is also a sequentially data structure and same as the queue but it have somehing called priority. in queue there is first come first serve but in this
which have higher priority then he will get first to serve.

d. A process scheduler for an operating system that runs jobs using a first-come-first-served rule.

Queue data structure will be used efficient for above requirement.
Queue is implementation first-come-first-served any jobs that want to execute it have to come in queue. the first who came gets chance to
execute first one the currebt job get finished then only another job will executes

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote