Question
1.
2.
3.
4.
Answer (Detailed Solution Below)
Option 1 : Deque / डेक (Deque)
Advertisement
Detailed Solution
सही उत्तर Deque / डेक (Deque) है।
Key Points
Helpful?
Question:
Which data structure allows insertion and deletion at both ends in O(1) time / कौन-सी डेटा संरचना O(1) समय में दोनों सिरों पर निवेशन और विलोपन की अनुमति देती है
1.
Deque / डेक (Deque)
2.
Stack / स्टैक
3.
Queue / कतार
4.
Priority queue / प्राथमिकता कतार
Correct Answer: Deque / डेक (Deque)
A double-ended queue is designed exactly for constant-time insertion and deletion at both the front and the rear; stacks and queues restrict operations to one end each. / द्वि-सिरा कतार (double-ended queue) आगे और पीछे दोनों सिरों पर नियत-समय निवेशन और विलोपन के लिए ही बनाई गई है; स्टैक और कतार प्रत्येक एक-एक सिरे तक संक्रियाएँ सीमित करते हैं।
Downloaded from PrepSnap (prepsnap.in)