Question:medium

Given a scenario: Suppose there is a web-server hosting a website to declare results. This server can handle a maximum of 100 concurrent requests to view results. So, as to serve thousands of user requests, a __________ would be the most appropriate data structure to use.

Show Hint

Use Queue (FIFO) for scheduling requests in web servers, operating systems, and printer jobs where fairness/order is needed.
Updated On: Feb 15, 2026
  • Stack
  • Queue
  • List
  • Dictionary
Show Solution

The Correct Option is B

Solution and Explanation

Stage 1: Problem Definition.
A web server handles a high volume of requests (thousands) but has a limited processing capacity (100 concurrent requests). Incoming requests exceeding this capacity are placed in a waiting line.
Stage 2: Data Structure Characteristics.
- Stack: Last-In, First-Out (LIFO) principle, not suitable for equitable request handling.
- Queue: First-In, First-Out (FIFO) principle, guarantees requests are processed in their arrival sequence.
- List: A general collection, but offers no inherent order for request processing.
- Dictionary: Designed for key-value associations, not optimized for managing request order.

Stage 3: Optimal Solution.
Given the requirement for processing requests strictly by arrival order, a Queue is the most fitting data structure.
Conclusion: \[\boxed{\text{Queue}}\]
Was this answer helpful?
0


Questions Asked in CUET (UG) exam