Data Structures and Algorithms — MCQ Practice

Hindi aur English dono mein practice karo — click karo answer check karne ke liye

📚 819 Questions 🌐 Hindi + English ✅ Free
भाषा / Language:
819 questions
61
EN + हिं Hard
GB Evaluate postfix '5 1 2 + 4 * + 3 -':
IN उपसर्ग '5 1 2 + 4 * + 3 -' का मूल्यांकन करें:
A
11 11
B
14 14
C
10 10
D
12 12
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) 1+2=3; 3*4=12; 5+12=17; 17-3=14.
व्याख्या (हिन्दी) 1+2=3; 3*4=12; 5+12=17; 17-3=14.
62
EN + हिं Medium
GB When top==null in stack?
IN जब स्टैक में शीर्ष==शून्य हो?
A
Stack is full ढेर भरा हुआ है
B
Stack is overflow ढेर अतिप्रवाह है
C
Stack is empty ढेर खाली है
D
Stack has one element स्टैक में एक तत्व है
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) IS_EMPTY: S.top==null means stack is empty.
व्याख्या (हिन्दी) IS_EMPTY: S.top==null का मतलब है कि स्टैक खाली है।
63
EN + हिं Easy
GB What does IS_EMPTY check in a stack?
IN IS_EMPTY स्टैक में क्या जाँच करता है?
A
head==tail सिर==पूँछ
B
S.top==null एस.टॉप==शून्य
C
size==0 आकार==0
D
Stack has overflow ढेर अतिप्रवाह है
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) IS_EMPTY: if S.top==null, return True.
व्याख्या (हिन्दी) IS_EMPTY: यदि S.top==null है, तो True लौटाएँ।
64
EN + हिं Medium
GB Activation record of a function is stored in?
IN किसी फ़ंक्शन का एक्टिवेशन रिकॉर्ड कहाँ संग्रहित किया जाता है?
A
Heap memory स्मृति ढेर
B
Stack memory (call stack) स्टैक मेमोरी (कॉल स्टैक)
C
BSS segment बीएसएस खंड
D
Code segment कोड खंड
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) Each function's activation record (local vars, return addr) on call stack.
व्याख्या (हिन्दी) कॉल स्टैक पर प्रत्येक फ़ंक्शन का सक्रियण रिकॉर्ड (स्थानीय संस्करण, रिटर्न पता)।
65
EN + हिं Medium
GB After push(10),push(20),push(30),pop() — top is?
IN पुश(10), पुश(20), पुश(30), पॉप() के बाद - शीर्ष है?
A
10 10
B
30 30
C
20 20
D
Empty खाली
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) push [10,20,30], pop removes 30. Now 20 is on top.
व्याख्या (हिन्दी) पुश [10,20,30], पॉप 30 हटा देता है। अब 20 शीर्ष पर है।
66
EN + हिं Medium
GB Operation to add element to queue?
IN कतार में तत्व जोड़ने के लिए ऑपरेशन?
A
Push धकेलना
B
Insert डालना
C
Enqueue कतारबद्ध करें
D
Add जोड़ना
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) Enqueue adds element to the rear of the queue.
व्याख्या (हिन्दी) एनक्यू कतार के पीछे तत्व जोड़ता है।
67
EN + हिं Medium
GB Operation to remove element from queue?
IN कतार से तत्व को हटाने के लिए ऑपरेशन?
A
Pop जल्दी से आना
B
Delete मिटाना
C
Dequeue विपंक्ति
D
Remove निकालना
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) Dequeue removes element from the front of the queue.
व्याख्या (हिन्दी) Dequeue, कतार के सामने से तत्व को हटा देता है।
68
EN + हिं Easy
GB Real-world example of queue?
IN कतार का वास्तविक विश्व उदाहरण?
A
Stack of books किताबों का ढेर
B
Movie ticket queue (FIFO) मूवी टिकट कतार (फीफो)
C
Call stack कॉल स्टैक
D
Priority boarding प्राथमिकता बोर्डिंग
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) Movie ticket queue: first person in line served first.
व्याख्या (हिन्दी) मूवी टिकट कतार: लाइन में पहले व्यक्ति को पहले सेवा दी गई।
69
EN + हिं Medium
GB OS job scheduling with equal priority uses?
IN समान प्राथमिकता वाले उपयोगों के साथ ओएस जॉब शेड्यूलिंग?
A
Stack ढेर
B
Queue कतार
C
BST बीएसटी
D
Hash table हैश तालिका
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) Queue for OS scheduling — jobs executed in arrival order (FIFO).
व्याख्या (हिन्दी) ओएस शेड्यूलिंग के लिए कतार - आगमन क्रम (फीफो) में निष्पादित नौकरियां।
70
EN + हिं Medium
GB FRONT operation in queue:
IN कतार में फ्रंट ऑपरेशन:
A
Removes front सामने हटा देता है
B
Returns front without removing बिना हटाए सामने लौट आता है
C
Adds to front सामने जोड़ता है
D
Checks if rear full जाँचता है कि पिछला भाग भरा हुआ है या नहीं
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) FRONT returns front element without dequeuing (like peek in stack).
व्याख्या (हिन्दी) FRONT बिना पंक्ति बनाए सामने वाला तत्व लौटाता है (जैसे स्टैक में झांकना)।
71
EN + हिं Medium
GB Printer spooling uses which data structure?
IN प्रिंटर स्पूलिंग किस डेटा संरचना का उपयोग करता है?
A
Stack ढेर
B
Queue कतार
C
Binary tree बाइनरी वृक्ष
D
Hash table हैश तालिका
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) Printer spooling uses queue — print jobs in order of submission.
व्याख्या (हिन्दी) प्रिंटर स्पूलिंग सबमिशन के क्रम में क्यू - प्रिंट जॉब का उपयोग करता है।
72
EN + हिं Medium
GB Call center uses which structure to hold waiting customers?
IN कॉल सेंटर प्रतीक्षारत ग्राहकों को रोकने के लिए किस संरचना का उपयोग करता है?
A
Stack ढेर
B
Queue कतार
C
BST बीएसटी
D
Hash table हैश तालिका
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) Call centers use queues — customers served in arrival order.
व्याख्या (हिन्दी) कॉल सेंटर कतारों का उपयोग करते हैं - ग्राहकों को आगमन क्रम में सेवा दी जाती है।
73
EN + हिं Medium
GB Minimum queues needed to implement a stack?
IN स्टैक को लागू करने के लिए न्यूनतम कतारों की आवश्यकता है?
A
1 1
B
2 2
C
3 3
D
4 4
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) 2 queues needed to implement a stack.
व्याख्या (हिन्दी) एक स्टैक को लागू करने के लिए 2 कतारों की आवश्यकता है।
74
EN + हिं Easy
GB What does 'head' pointer point to?
IN 'हेड' सूचक किस ओर इंगित करता है?
A
Last element अंतिम तत्व
B
First element पहला तत्व
C
Middle element मध्य तत्व
D
NULL व्यर्थ
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) Head always points to the first node of the linked list.
व्याख्या (हिन्दी) हेड हमेशा लिंक की गई सूची के पहले नोड की ओर इशारा करता है।
75
EN + हिं Medium
GB In doubly LL addNode(), when list is empty?
IN डबली एलएल ऐडनोड() में, सूची खाली होने पर?
A
Both head and tail point to new node हेड और टेल दोनों नए नोड की ओर इशारा करते हैं
B
Only tail केवल पूँछ
C
Head stays NULL सिर शून्य रहता है
D
Only head केवल सिर
✅ Correct Answer:
💡 Explanation / व्याख्या
Explanation (English) When empty: self.head=self.tail=newNode.
व्याख्या (हिन्दी) खाली होने पर: self.head=self.tail=newNode.
61–75 of 819