Which one of the following is not the application of the queue data structure?
2023
Which one of the following is not the application of the queue data structure?
- A.
Data is transferred asynchronously
- B.
Resource is shared between various systems
- C.
Balancing of symbols
- D.
More than one of the above
- E.
None of the above
Attempted by 679 students.
Show answer & explanation
Correct answer: C
A queue is a data structure that follows the First-In-First-Out (FIFO) principle. It is commonly used in scenarios where data needs to be processed in the order it arrives.
Applications of queues include asynchronous data transfer and sharing resources among systems, as both require orderly processing of requests.
However, balancing symbols requires matching opening and closing brackets in a nested manner, which is best handled by a stack (LIFO), not a queue.
Therefore, balancing symbols is not an application of the queue data structure.
हिन्दी उत्तर:
क्यू एक डेटा संरचना है जो फर्स्ट-इन-फर्स्ट-आउट (FIFO) सिद्धांत का पालन करती है। ऐसे स्थितियों में इसका उपयोग आमतौर पर किया जाता है जहाँ डेटा को आने के क्रम में प्रोसेस करने की आवश्यकता होती है।
क्यू के अनुप्रयोगों में असिंक्रोनस डेटा ट्रांसफर और विभिन्न सिस्टमों के बीच संसाधन साझा करना शामिल है, क्योंकि दोनों में अनुरोधों की क्रमबद्ध प्रक्रिया की आवश्यकता होती है।
हालाँकि, प्रतीकों का संतुलन खुलने और बंद होने वाले ब्रैकेट्स को नेस्टेड तरीके से मैच करने की आवश्यकता होती है, जो एक स्टैक (LIFO) द्वारा सबसे अच्छी तरह से संभाला जाता है, क्योंकि क्यू नहीं कर सकती।
इसलिए, प्रतीकों का संतुलन क्यू डेटा संरचना का अनुप्रयोग नहीं है।