• What is dequeue in hindi
  • Types of dequeue
  • What is circular array
  • Operations on dequeue
  • Implementation of dequeue
  • Time complexity
  • Application of dequeue

इस ब्लॉग मे समझेंगे double ended queue (dequeue) data structure के बारे मे I इसके operations इसकी implementation और applications I

What is Deque( क्या

होता है ) हिंदी में

Deque या double ended queue एक प्रकार है queue का I इस data structure मे हम elements का insertion और removal दोनों front और rear end से कर सकते है I

Queue data structure FIFO(First in First Out) order का पालन करता है लेकिन dequeue मे दोनों end से insertion और deletion होता है इसलिए dequeue FIFO order का पालन नहीं करता है I

Dequeue stack और queue दोनों के तरह use हो सकता है क्युकी इसमे दोनों end से insertion deletion होता है I

Types of Deque in hindi

  • Input Restricted Dequeue – ये dequeue का प्रकार है जिसमे कुछ प्रतिबंध लगाए जाते है insertion मे

input restricted dequeue मे insertion एक end से ही हो सकता होता है और deletion दोनों end से होता है I

  • Output Restricted Dequeue – ये dequeue का प्रकार है जिसमे कुछ प्रतिबंध लगाए जाते है deletion मे

output restricted dequeue मे deletion एक end से ही हो सकता है और insertion दोनों end होता है I

What is Circular array In hindi

एक array को हम circular बोलते है अगर last element array का जुरा रहे first element से

जैसे मान लेते है array का size 4 है और array full है लेकिन array का first location खाली है , अगर हमे array मे element insert करना है तो ये overflow condition नहीं दिखाएगा क्युकी last element जुरा हुआ है first element से I

और जो value हमे insert करनी है वो array के first location मे add हो जाएगी I

Operations on Dequeue in hindi

ये operations applied होते है dequeue मे :

  • Insert at front
  • Delete from end
  • Insert at rear
  • delete from rear

नीचे हम देखेंगे circular array implementation dequeue का ,circular array मे अगर array full है तो हम शुरुआत से शुरू करेंगे I

लेकिन linear array implementation मे अगर array full है तो कोई नई element insert नहीं कर सकते I अगर array full है तो नीचे की operations मे “overflow message ” आएगा

इन operations perform करने के पहले ,कुछ steps को follow करना है –

  • एक array (dequeue) लेंगे n size का
  • दो pointers को first position पे set करेंगे और front = -1 और rear = 0 set करेंगे

Insert at the Front

इस operation मे हम element add करते है front position पे I

Algorithm –
  1. Front की position check करेंगे

2. अगर front < 1 है तो reinitialize करेंगे front = n-1 (last index)

3. अगर नहीं तो front को decrease कर देंगे 1 से

4. नई element 5 add करेंगे array[front] मे

Insert at the Rear

इस operation मे हम element add करते है rear position पे I

Algorithm –
  1. Check करेंगे क्या array भरा है

2. अगर dequeue भरा हुआ है तो reinitialize करेंगे rear = 0

3. अगर नहीं तो rear को 1 से बढ़ा देंगे

4. नई element 5 को array[rear] मे add कर देंगे

By Sachin singh

Created Blog and articles about specific subject matter. collected pictures or content and attached it to the article. Discussed about a certain subject in the form of writing. Shared experiences or comments regarding a subject. Compiled written articles for futures references. EDUCATION Bachelor’s tech in CSE, 2019-23 Aaryabhatta Knowledge University, Patna. Professional Area Search Engine optimization & analyze data, About Stock market analysist. Raghav Suryavanshi, (Sachin Singh) myself Raghav Suryavanshi ,In honor of being blogging sites, I own this blogging site. We and our team feel very sincerely sharing new knowledge with you. राघव सूर्यवंशी fb link - https://m.facebook.com/Fbsachinsingh

Leave a Reply