YDI 6: Linear Data Structure Examples
For each of the following scenarios, identify whether a Stack, a Queue, or a Deque would be the best data structure for the problem.
Note, for some of these scenarios the answer may depend on specific details that aren't provided in the description. Therefore, for each example, think carefully about whether you are adding assumptions that impact your decision. Then think about whether a different set of assumptions would change your answer.
- Requests for tickets to a concert where everyone is equal.
- Requests for tickets to a concert where fan club members have priority.
- Storing the browsing history in Google Chrome so that the back arrow works
- Keeping track of the freshness of the food in your refridgerator.
- Assigning drivers to deliver pizzas.
- Assigning teachers to supervise the cafeteria.
- Keeping track of where you have been in a corn maze.