Question:

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: Sep 18, 2025
  • Stack
  • Queue
  • List
  • Dictionary
Hide Solution
collegedunia
Verified By Collegedunia

The Correct Option is B

Solution and Explanation

Step 1: Understand the problem.
A web server receives thousands of requests, but it can only process a limited number (100 in this case) at a time. Other requests must wait in line.
Step 2: Properties of data structures.
- Stack: LIFO structure, unsuitable for fair processing of multiple requests.
- Queue: FIFO structure, ensures requests are handled in the order they arrive.
- List: General collection, but no enforced order for processing requests.
- Dictionary: Key-value mapping, not suitable for request scheduling.

Step 3: Best fit.
Since requests must be processed in arrival order, a Queue is the most appropriate data structure.
Final Answer: \[ \boxed{\text{Queue}} \]
Was this answer helpful?
0
0

Questions Asked in CUET exam

View More Questions