PGDCA, BCA, B-Tech, MCA, M-Tech, B.Sc computer science राजस्थान सूचना सहायक व कंप्यूटर शिक्षक विशेष नोट्स: इस अध्याय में हम Linear Queue Limitations: False Overflow and Memory Wastage (लीनियर कतार की सीमाएं: फॉल्स ओवरफ्लो और मेमोरी की बर्बादी) की संपूर्ण थ्योरी, मुख्य तकनीकी बिंदु, तुलनात्मक तालिका और विगत परीक्षाओं के पैटर्न पर आधारित 20 अति-महत्वपूर्ण बहुविकल्पीय प्रश्न (MCQs) विस्तृत हिंदी व अंग्रेजी व्याख्या सहित पढ़ेंगे।
Overview: Linear Queue implemented over a static array suffers from False Overflow—reporting Queue Full whenever rear equals MAX - 1 even though multiple slots before front have been vacated by deletions. Because indices 0 through front - 1 remain permanently unusable until full drainage, memory is wasted unless mitigated via Circular Queue or Linked List.
अध्याय सार: स्टैटिक एरे आधारित लीनियर कतार में 'फॉल्स ओवरफ्लो' (False Overflow) की गंभीर समस्या होती है, जहाँ डिकतार से आगे की जगह खाली होने के बावजूद rear == MAX - 1 होते ही कतार को भरा हुआ मान लिया जाता है। इंडेक्स 0 से front - 1 तक की खाली मेमोरी बेकार पड़ी रहती है, जिसे सर्कुलर कतार या लिंक्ड लिस्ट से हल किया जाता है।
Linear Queue Limitations: False Overflow and Memory Wastage: Detailed Notes & Architecture (लीनियर कतार की सीमाएं: फॉल्स ओवरफ्लो और मेमोरी की बर्बादी)
1. Right-Drift Mechanics and False Overflow (राइट-ड्रिफ्ट प्रक्रिया और फॉल्स ओवरफ्लो (False Overflow))
[EN] In a linear array queue, both front and rear pointers advance monotonically from left to right. Suppose MAX = 5: inserting 5 elements leaves front = 0 and rear = 4. Deleting 3 elements advances front to 3, leaving indices 0, 1, and 2 empty while only 2 items remain. Any new enqueue() checks rear == MAX - 1 (4 == 4) and falsely declares Overflow despite 60% of the buffer being free.
[HI] लीनियर एरे कतार में front और rear दोनों केवल बाईं से दाईं ओर बढ़ते हैं। मान लें MAX = 5 की कतार में 5 तत्व डालने पर rear = 4 हो जाता है और फिर 3 तत्व हटाने पर front = 3 हो जाता है। अब इंडेक्स 0, 1, 2 खाली हैं, फिर भी नया तत्व जोड़ने पर rear == MAX - 1 (4 == 4) के कारण गलत तरीके से Overflow दिखाई देता है—इसे ही फॉल्स ओवरफ्लो कहते हैं।
2. Memory Wastage in Dead Prefix Slots (खाली पड़े शुरुआती स्लॉट्स में मेमोरी की बर्बादी)
[EN] Whenever front > 0, all array cells from index 0 up to front - 1 become unreachable 'dead memory' for subsequent insertions. As long as incoming requests keep arriving faster than the queue completely empties (so front == rear reset never triggers), those front wasted slots accumulate indefinitely. In streaming or server buffers, even a massive 10,000-slot linear array stalls permanently after 10,000 total insertions.
[HI] जब भी front > 0 होता है, इंडेक्स 0 से front - 1 तक के सभी एरे ब्लॉक नई प्रविष्टियों के लिए अनुपयोगी 'डेड मेमोरी' बन जाते हैं। यदि कतार बीच में पूरी तरह खाली न हो पाए, तो ये व्यर्थ स्लॉट दोबारा उपयोग नहीं हो सकते। इस प्रकार एक 10,000 क्षमता वाली लीनियर कतार भी कुल 10,000 प्रविष्टियों के बाद अटक जाएगी, चाहे उसमें हर समय केवल कुछ ही तत्व रहे हों।
3. Why Naive Array Shifting Fails Performance (O(n) Bottleneck) (एरे शिफ्टिंग समाधान की विफलता और O(n) समय नुकसान)
[EN] One naive workaround keeps front pinned at 0 and shifts every remaining element one slot left upon each dequeue() (arr[i] = arr[i + 1] for i from 0 to rear - 1). While eliminating false overflow, shifting turns dequeue() from constant O(1) into expensive O(n) linear time per deletion. Shifting 10^5 elements on every packet pop destroys throughput in real-time systems.
[HI] फॉल्स ओवरफ्लो से बचने का एक साधारण तरीका यह है कि प्रत्येक dequeue() पर बचे हुए सभी तत्वों को एक कदम बाईं ओर खिसका (shift) दिया जाए। इससे खाली जगह तो मिल जाती है, परंतु dequeue() की समय जटिलता O(1) से बिगड़कर O(n) हो जाती है। बड़े बफर में हर बार लाखों तत्व खिसकाना प्रदर्शन को बुरी तरह धीमा कर देता है।
4. Architectural Solutions: Circular Queue vs Linked List (स्थायी समाधान: सर्कुलर कतार बनाम लिंक्ड लिस्ट कतार)
[EN] Two canonical designs solve linear queue wastage cleanly while preserving O(1) enqueue and dequeue. First, a Circular Queue wraps rear and front modulo array size via (index + 1) % MAX, immediately reusing freed prefix slots in contiguous RAM. Second, a Linked-List Queue allocates nodes dynamically on the heap and frees each dequeued node immediately, avoiding fixed-capacity wastage altogether at a small pointer-memory overhead.
[HI] O(1) गति बनाए रखते हुए इस समस्या के दो मानक समाधान हैं। पहला, सर्कुलर कतार जो (index + 1) % MAX मॉड्यूलो गणित से rear को घुमाकर इंडेक्स 0 के खाली स्लॉट पुनः उपयोग करती है। दूसरा, लिंक्ड लिस्ट कतार जो हर dequeue पर नोड की मेमोरी तुरंत मुक्त (free) कर देती है, जिससे निश्चित आकार वाली बर्बादी समाप्त हो जाती है।
Syntax, Formula & Technical Example (Linear Queue Limitations: False Overflow and Memory Wastage)
// Trace on MAX = 4 showing False Overflow:
// 1) Enqueue 10,20,30,40 -> [10, 20, 30, 40] (front=0, rear=3)
// 2) Dequeue 3 items -> [--, --, --, 40] (front=3, rear=3)
// 3) Enqueue 50 -> checks (rear == MAX - 1) -> (3 == 3) -> FALSE OVERFLOW!
// Naive O(n) shift fix on dequeue (NOT recommended):
for (int i = front; i < rear; i++) arr[i] = arr[i + 1];
rear--; // Eliminates wasted slots, but degrades dequeue to O(n)!
Linear Queue Limitations: False Overflow and Memory Wastage Quick Reference & Comparison Table
| Limitation / Approach | Technical Mechanism | Key Exam Fact |
|---|---|---|
| False Overflow | rear == MAX - 1 triggers Full while front > 0 | Empty prefix slots remain unreachable |
| Dead Prefix Memory | Exactly `front` slots (0..front-1) sit unused | Only resets if queue drains completely |
| Left-Shift Workaround | Slides all remaining items left after each dequeue | Degrades dequeue from O(1) to O(n) |
| Circular / Linked Fix | Modulo wrap-around or dynamic heap nodes | Restores O(1) speed with zero dead slots |
Linear Queue Limitations: False Overflow and Memory Wastage Top 20 Bilingual MCQs with Answers
Q1. What exact situation defines 'False Overflow' in a linear array queue?
(लीनियर एरे कतार में 'फॉल्स ओवरफ्लो' (False Overflow) किसे कहते हैं?)
(A) front pointer moves backward past index 0
(B) Array runs out of heap RAM dynamically
(C) Queue reports Full (rear == MAX - 1) even though deleted slots before front are empty
(D) Queue reports Empty when elements exist
Correct Answer: (C)
[EN] False overflow happens because rear reaches MAX - 1 while front > 0 leaves free cells at indices 0..front-1.
[HI] जब डिकतार से आगे कई स्लॉट खाली हों (front > 0) लेकिन rear == MAX - 1 होने से कतार भरी हुई दिखे, तो उसे फॉल्स ओवरफ्लो कहते हैं।
Q2. In a 0-indexed linear queue of capacity MAX = 8 with front = 5 and rear = 7, how many array slots are wasted before front?
(MAX = 8 क्षमता वाली 0-इंडेक्स्ड लीनियर कतार में यदि front = 5 और rear = 7 है, तो front से पहले कितने स्लॉट बेकार पड़े हैं?)
(A) 5 wasted slots (indices 0 to 4)
(B) 7 wasted slots
(C) 3 wasted slots
(D) 2 wasted slots
Correct Answer: (A)
[EN] Indices 0, 1, 2, 3, and 4—totaling front = 5 slots—have been vacated by deletions and cannot be reused rightward.
[HI] इंडेक्स 0 से 4 तक कुल front = 5 स्लॉट डिलीट हो चुके हैं और पुनः उपयोग नहीं हो पा रहे हैं।
Q3. In the scenario MAX = 8, front = 5, rear = 7, what happens when you attempt to enqueue one more item in a linear queue?
(MAX = 8, front = 5, rear = 7 की स्थिति में लीनियर कतार में एक नया तत्व एनकतार करने पर क्या होगा?)
(A) The item shifts elements automatically
(B) Queue Overflow (False Overflow) is raised despite 5 free slots
(C) The item is placed at index 0
(D) The item overwrites index 5
Correct Answer: (B)
[EN] Because rear equals 7 (MAX - 1), linear queue insertion rejects the item as Overflow.
[HI] rear = 7 (MAX - 1) होने के कारण 5 खाली जगहों के बावजूद फॉल्स ओवरफ्लो त्रुटि आएगी।
Q4. If you fix linear queue false overflow by shifting all remaining items left on every dequeue(), what becomes the worst-case time complexity of dequeue()?
(यदि हर dequeue() पर बचे हुए तत्वों को बाईं ओर खिसकाकर फॉल्स ओवरफ्लो रोका जाए, तो dequeue() की समय जटिलता क्या हो जाएगी?)
(A) O(1)
(B) O(n)
(C) O(log n)
(D) O(n^2)
Correct Answer: (B)
[EN] Shifting up to n - 1 elements leftward on every deletion degrades dequeue() from O(1) to O(n).
[HI] प्रत्येक विलोपन पर शेष सभी तत्वों को खिसकाने से dequeue() की जटिलता O(1) से बढ़कर O(n) हो जाती है।
Q5. Which two data structures resolve linear queue memory wastage while retaining O(1) enqueue and O(1) dequeue?
(कौन सी दो डेटा संरचनाएं O(1) गति बनाए रखते हुए लीनियर कतार की मेमोरी बर्बादी को समाप्त करती हैं?)
(A) Two-way Stack Array without wrap
(B) Sorted Array Priority Queue
(C) Binary Search Tree and Linear Array
(D) Circular Queue and Linked-List Queue
Correct Answer: (D)
[EN] Circular queues wrap indices via modulo arithmetic, while linked lists free nodes dynamically—both in O(1).
[HI] सर्कुलर कतार मॉड्यूलो घुमाव से और लिंक्ड लिस्ट कतार डायनामिक नोड प्रबंधन से O(1) समय में मेमोरी बचाती है।
Q6. When can a static linear array queue recover wasted prefix slots WITHOUT shifting and WITHOUT modulo wrap-around?
(बिना शिफ्टिंग और बिना सर्कुलर मॉड्यूलो के एक स्टैटिक लीनियर कतार खाली स्लॉट कब पुनः प्राप्त कर सकती है?)
(A) Only when the queue drains completely down to the single last item and resets front = rear = -1
(B) Whenever rear reaches MAX - 2
(C) Whenever front reaches MAX / 2
(D) After every single dequeue()
Correct Answer: (A)
[EN] Only complete emptiness triggers the front = rear = -1 reset in a standard linear queue.
[HI] सामान्य लीनियर कतार में केवल कतार के पूरी तरह खाली होने (front == rear रीसेट) पर ही इंडेक्स 0 पुनः खुलता है।
Q7. Suppose a linear queue of size 100 processes 100 inserts followed by 99 deletes, leaving 1 item at index 99. Can it accept 1 more insert?
(साइज 100 की लीनियर कतार में 100 बार insert और 99 बार delete के बाद इंडेक्स 99 पर केवल 1 तत्व बचा है। क्या इसमें 1 नया तत्व जुड़ सकता है?)
(A) Yes, at index 98
(B) Yes, at index 0
(C) No — rear is still 99 (MAX - 1), triggering False Overflow despite 99 empty slots
(D) Yes, because count is only 1
Correct Answer: (C)
[EN] Even with 99% of the array vacant, rear == 99 blocks insertion in a linear queue.
[HI] 99 खाली जगह होने के बावजूद rear == 99 (MAX - 1) होने से नई प्रविष्टि संभव नहीं होगी (फॉल्स ओवरफ्लो)।
Q8. Which specific pointer movement causes dead slots to accumulate in a linear queue?
(लीनियर कतार में किस पॉइंटर की एकतरफा गति से शुरुआती स्लॉट बेकार (dead) होते जाते हैं?)
(A) Incrementing front on enqueue
(B) Unidirectional rightward increment of front on dequeue without wrap-around
(C) Resetting rear to 0 on overflow
(D) Decrementing rear on dequeue
Correct Answer: (B)
[EN] Each dequeue() moves front rightward (front++), abandoning the vacated slot at front - 1.
[HI] प्रत्येक dequeue() पर front के केवल आगे बढ़ने (front++) से पीछे छूटे स्लॉट अनुपयोगी हो जाते हैं।
Q9. Compare Linked-List Queue vs Circular Array Queue: which one avoids fixed compile-time capacity limits entirely?
(लिंक्ड-लिस्ट कतार और सर्कुलर एरे कतार में से कौन निश्चित संकलन-समय आकार सीमा से मुक्त रहती है?)
(A) Linked-List Queue (grows dynamically up to available heap RAM)
(B) Linear Array Queue
(C) Circular Array Queue
(D) Shifted Static Array Queue
Correct Answer: (A)
[EN] A linked list allocates nodes dynamically at runtime, whereas circular arrays still have a fixed MAX capacity.
[HI] लिंक्ड-लिस्ट कतार रनटाइम पर डायनामिक मेमोरी लेती है, जबकि सर्कुलर कतार की क्षमता भी MAX तक सीमित रहती है।
Q10. How many total enqueues can a MAX = 50 linear queue accept if at least 1 item always remains inside (never fully empty)?
(यदि MAX = 50 की लीनियर कतार कभी पूरी तरह खाली न हो (हमेशा कम से कम 1 तत्व रहे), तो वह जीवनकाल में कुल कितने enqueue स्वीकार करेगी?)
(A) At most 50 total enqueues across its entire lifetime
(B) Unlimited enqueues
(C) 2500 total enqueues
(D) 100 total enqueues
Correct Answer: (A)
[EN] Since the queue never drains completely to trigger the -1 reset, rear advances from 0 to 49 once and halts after 50 insertions.
[HI] कतार के कभी पूरी तरह खाली न होने से रीसेट नहीं होगा, इसलिए rear केवल 0 से 49 तक 50 बार ही बढ़ पाएगा।
Q11. Why isn't shifting elements on enqueue() (instead of dequeue) enough by itself if rear == MAX - 1?
(यदि rear == MAX - 1 होने पर केवल कभी-कभार पूरा एरे बाईं ओर खिसकाया (compact) जाए, तो उसकी समय जटिलता क्या होगी?)
(A) O(log n)
(B) O(n) worst-case pause during that enqueue
(C) O(1) always
(D) Zero overhead
Correct Answer: (B)
[EN] Compacting remaining elements on overflow still takes O(n) worst-case time for that enqueue call.
[HI] ओवरफ्लो पर बचे तत्वों को खिसकाने (compaction) में उस enqueue कॉल के लिए O(n) समय लगता है।
Q12. In a linear queue with front = 3 and rear = 5 (MAX = 6), how many items are present vs how many free slots exist?
(MAX = 6 की लीनियर कतार में front = 3 और rear = 5 होने पर कितने तत्व मौजूद हैं और कुल कितने खाली स्लॉट हैं?)
(A) 3 elements present; 3 free slots (indices 0, 1, 2) unreachable
(B) 2 elements present; 4 free slots
(C) 5 elements present; 1 free slot
(D) 3 elements present; 0 free slots
Correct Answer: (A)
[EN] Active elements at [3, 4, 5] = 3; empty slots at [0, 1, 2] = 3, yet rear == 5 triggers false overflow.
[HI] इंडेक्स 3, 4, 5 पर 3 तत्व हैं और इंडेक्स 0, 1, 2 पर 3 खाली स्लॉट हैं, फिर भी नया तत्व नहीं डल सकता।
Q13. Which condition reliably distinguishes TRUE Full from FALSE Overflow in a linear array queue?
(लीनियर एरे कतार में वास्तविक पूर्ण (True Full) और फॉल्स ओवरफ्लो के बीच सटीक अंतर कैसे पहचाना जाता है?)
(A) True Full: front == rear; False Overflow: front == -1
(B) True Full: rear == 0; False Overflow: front == 0
(C) True Full: front == 0 && rear == MAX - 1; False Overflow: front > 0 && rear == MAX - 1
(D) True Full: front > rear; False Overflow: rear == 0
Correct Answer: (C)
[EN] When rear reaches MAX - 1 with front == 0, every slot 0..MAX-1 holds data; when front > 0, empty slots exist at the left.
[HI] जब front == 0 और rear == MAX - 1 हो तो पूरा एरे भरा है (True Full); यदि front > 0 हो तो यह False Overflow है।
Q14. Does a Stack suffer from the same 'False Overflow' limitation in a fixed array?
(क्या स्टैटिक एरे में बने स्टैक (Stack) में भी लीनियर कतार जैसी 'फॉल्स ओवरफ्लो' समस्या आती है?)
(A) Yes, after 2 pops
(B) Yes, whenever top == 0
(C) Yes, identical right-drift
(D) No — Stack inserts and deletes at the same top end, immediately reusing popped slots
Correct Answer: (D)
[EN] In a Stack, pop() decrements top--, so the very next push() immediately reuses the freed cell without dead memory.
[HI] स्टैक में pop() से top पीछे घटता है, इसलिए खाली हुआ स्लॉट अगले push() में तुरंत पुनः उपयोग हो जाता है।
Q15. If a linear queue uses front = 0, rear = -1 and executes 4 enqueues then 4 dequeues on MAX = 5 without reset, what happens next?
(यदि बिना रीसेट वाली लीनियर कतार (MAX = 5, front = 0, rear = -1) में 4 enqueue और 4 dequeue किए जाएँ, तो अब अधिकतम कितने और enqueue हो पाएंगे?)
(A) Only 1 more enqueue (at index 4) before False Overflow
(B) 4 more enqueues
(C) 5 more enqueues
(D) 0 more enqueues
Correct Answer: (A)
[EN] After 4 enqueues, rear = 3; after 4 dequeues, front = 4, rear = 3 (empty). Only index 4 remains before rear == MAX - 1.
[HI] 4 प्रविष्टियों के बाद rear = 3 होगा; आगे केवल इंडेक्स 4 ही बचा है, इसलिए सिर्फ 1 और enqueue हो पाएगा।
Q16. Which statement is NOT true about Linear Queue limitations?
(लीनियर कतार की सीमाओं के बारे में कौन सा कथन असत्य (NOT true) है?)
(A) Shifting elements during dequeue raises complexity to O(n)
(B) Vacated slots before front cannot be reused without shifting or wrap-around
(C) Circular Queue eliminates false overflow while keeping O(1) operations
(D) Increasing MAX to a larger constant permanently eliminates false overflow under continuous traffic
Correct Answer: (D)
[EN] A larger MAX only delays false overflow; continuous arrival without full drainage will still eventually hit rear == MAX - 1.
[HI] MAX बड़ा करने से फॉल्स ओवरफ्लो केवल कुछ देर टलता है, स्थायी रूप से समाप्त नहीं होता।
Q17. Within Linear Queue Limitations: False Overflow and Memory Wastage, which limitation / approach directly maps to: "rear == MAX - 1 triggers Full while front > 0"?
(Linear Queue Limitations: False Overflow and Memory Wastage में कौन सा Limitation / Approach सीधे "rear == MAX - 1 triggers Full while front > 0" से संबंधित है?)
(A) Circular / Linked Fix
(B) Left-Shift Workaround
(C) False Overflow
(D) Dead Prefix Memory
Correct Answer: (C)
[EN] In Linear Queue Limitations: False Overflow and Memory Wastage, 'False Overflow' handles 'rear == MAX - 1 triggers Full while front > 0' (Empty prefix slots remain unreachable).
[HI] Linear Queue Limitations: False Overflow and Memory Wastage में 'False Overflow' का कार्य/विवरण 'rear == MAX - 1 triggers Full while front > 0' (Empty prefix slots remain unreachable) है।
Q18. Which option accurately describes 'Dead Prefix Memory' in Linear Queue Limitations: False Overflow and Memory Wastage?
(Linear Queue Limitations: False Overflow and Memory Wastage के संदर्भ में 'Dead Prefix Memory' की सही विशेषता कौन सी है?)
(A) rear == MAX - 1 triggers Full while front > 0
(B) Exactly `front` slots (0..front-1) sit unused
(C) Modulo wrap-around or dynamic heap nodes
(D) Slides all remaining items left after each dequeue
Correct Answer: (B)
[EN] 'Dead Prefix Memory' provides 'Exactly `front` slots (0..front-1) sit unused' — key point: Only resets if queue drains completely.
[HI] 'Dead Prefix Memory' का मुख्य विवरण 'Exactly `front` slots (0..front-1) sit unused' है (Only resets if queue drains completely)।
Q19. In Linear Queue Limitations: False Overflow and Memory Wastage, identify the correct parameter for the specification: "Slides all remaining items left after each dequeue".
(Linear Queue Limitations: False Overflow and Memory Wastage में "Slides all remaining items left after each dequeue" विवरण किस विकल्प के लिए सही है?)
(A) Dead Prefix Memory
(B) Circular / Linked Fix
(C) False Overflow
(D) Left-Shift Workaround
Correct Answer: (D)
[EN] 'Left-Shift Workaround' corresponds to 'Slides all remaining items left after each dequeue' (Degrades dequeue from O(1) to O(n)).
[HI] 'Left-Shift Workaround' का संबंध 'Slides all remaining items left after each dequeue' (Degrades dequeue from O(1) to O(n)) से है।
Q20. Considering Linear Queue Limitations: False Overflow and Memory Wastage, what key behavior defines 'Circular / Linked Fix'?
(Linear Queue Limitations: False Overflow and Memory Wastage में 'Circular / Linked Fix' की मुख्य भूमिका या मान क्या है?)
(A) rear == MAX - 1 triggers Full while front > 0
(B) Slides all remaining items left after each dequeue
(C) Modulo wrap-around or dynamic heap nodes
(D) Exactly `front` slots (0..front-1) sit unused
Correct Answer: (C)
[EN] 'Circular / Linked Fix' represents 'Modulo wrap-around or dynamic heap nodes' (Restores O(1) speed with zero dead slots).
[HI] 'Circular / Linked Fix' का अर्थ/मान 'Modulo wrap-around or dynamic heap nodes' है (Restores O(1) speed with zero dead slots)।
Linear Queue Limitations: False Overflow and Memory Wastage — Exam FAQs
Q1: Why doesn't a Linear Queue simply wrap rear to 0 automatically on its own?
लीनियर कतार खुद ही rear को घुमाकर इंडेक्स 0 पर क्यों नहीं ले जाती?
[EN] Without modulo arithmetic (rear + 1) % MAX and circular full/empty checks, setting rear = 0 would overwrite valid active data or break linear front <= rear logic—which is precisely why the Circular Queue design was invented.
[HI] मॉड्यूलो अंकगणित (rear + 1) % MAX और अलग पूर्ण/खाली शर्तों के बिना rear को 0 करने पर मौजूदा डेटा मिट सकता है; इन्हीं नियमों को जोड़ने पर सर्कुलर कतार बनती है।
Q2: Does shifting elements on dequeue solve memory wastage completely?
क्या हर dequeue() पर एरे तत्वों को बाईं ओर खिसकाने से मेमोरी बर्बादी खत्म हो जाती है?
[EN] Yes, it eliminates dead prefix slots and false overflow, but at an unacceptable cost: dequeue drops from O(1) to O(n) time, making circular queues strictly superior.
[HI] हाँ, खाली स्लॉट तो बच जाते हैं, परंतु प्रत्येक dequeue O(n) समय लेने लगता है—इसलिए सर्कुलर कतार कहीं बेहतर विकल्प है।
Q3: Can False Overflow happen in a Dynamic Linked-List Queue?
क्या लिंक्ड-लिस्ट से बनी कतार में भी फॉल्स ओवरफ्लो हो सकता है?
[EN] No! Each dequeued node is immediately deallocated via free()/delete, and new nodes are allocated dynamically anywhere in the heap, so false overflow never occurs.
[HI] नहीं! लिंक्ड लिस्ट में हटाया गया नोड तुरंत free कर दिया जाता है और नया नोड हीप मेमोरी में कहीं भी बन सकता है।
Post a Comment
Post a Comment