[Solved] Java Data Structures (Most Efficient Structure For Specific Program) [closed]
Deque: This would be a decent choice, since you can add/remove from both the front/end of the line in O(1) time, and the number of patients can be kept track of with an integer variable, so getting the size of the line would be O(1). You can also ensure a max capacity of N by … Read more