(Solved):(Java) Q1: To simulate people waiting in a line, which data structure would you use? Select one: Vector, List, Stack, Queue, Set Q2: In order to gain a last-in first-out access to data, which type… View Answer…

 

Question

(Java) Q1: To simulate people waiting in a line, which data structure would you use? Select one: Vector, List, Stack, Queue, Set

Q2: In order to gain a last-in first-out access to data, which type of structure should be used? Pick one: Queue, Linked List, Stack, Vector. Array

 

EXPERT ANSWER

1. The person who joins the line first will be processed first. This is called First-In-First-Out and can be implemented using Queue data

Scroll to top