क्यू क्या होती है What is Queue in data structure Type of Queue Hindi

What is Queue in Data Structure and type of Queue

Queue : Data structure Kya hota hai topic को लास्ट पोस्ट मे explain किया जा चूका है| Data structure की एक category liner data structure होती है जिसमे डाटा को एक specific order follow करते हुए store करते है| queue एक लीनियर डाटा structure है जिसमे डाटा एलिमेंट्स का deletion केवल एक end से होता है जिसको फ्रंट कहा जाता है जबकि डाटा एलिमेंट insertion दूसरे एन्ड से होता है जिसे rear कहा जाता है | क्यू मे जो एलिमेंट सबसे पहले insert किया जाता है वही एलिमेंट queue से सबसे पहले रिमूव होता है इसलिए कहा जाता है की Queue FIFO (First In First Out) structure को follow करती है| क्यू का एक end जिससे element insert किया जाता है उस process को enqueue एवं remove किये जाने वाले process को dequeue कहते है |

क्यू रियल life example – अगर किसी काम के लिए लोग queue मे लगे हुए है एवं अपनी बारी का wait कर रहे है तो जो व्यक्ति सबसे पहले लाइन मे लगा था उसका number भी सबसे पहले आएगा और उसका काम सबसे पहले होगा| इसका मतलब पहले आओ पहले पाओ or First in first out |

Read Also – What is Stack (LIFO)

Technology मे क्यू का example – Printing Task, disk storage access करने मे, CPU scheduling, Disk Scheduling एवं CPU के time sharing system मे भी क्यू का काम होता है | इसका मतलब technology मे क्यू का उपयोग तब किया जाता है जब बहुत सारे programs क्यू मे होते है और एक एक task को number से execute होना होता है|

what is queue in hindi data type operation function

What is queue in data Structure

क्यू features –

  1. क्यू, एलिमेंटस की ordered लिस्ट है जिसमे सिमिलर डाटा types होते है|
  2. क्यू FIFO( First in First Out ) structure होता है|
  3. क्यू मे अगर एक एलिमेंट ‘X’ add किया जाता है तो इस ‘X’ element को queue से remove करने के लिए ‘X’ से पहले insert किये गए सारे elements रिमूव करने होंगे|

क्यू Operations –  Four basic operations – 

  1. Enqueue : एलिमेंट को add करने के process को Enqueue कहते है|
  2. Dequeue : एलिमेंट को remove करने के process को Dequeue कहा जाता है|
  3. Front: क्यू का first item लेना|
  4. Rear: क्यू से last item लेना |

Functions of Basic Operations – Main functions of क्यू are – 

  1. enqueue() − एक एलिमेंट ऐड करने के लिए| 
  2. dequeue() − एक एलिमेंट को रिमूव करने के लिए| 
  3. peek() − एलिमेंट को रिमूव किये बिना फ्रंट से एक्सेस करने के लिए| 
  4. isfull() − क्यू का स्टेटस चेक करने के लिए की यह फुल है या नहीं| 
  5. isempty() − क्यू का स्टेटस चेक करने के लिए की यह empty है या नहीं| 

types of Queue:

1. Simple 
2. Circular
3. Priority 
4. Dequeue (Double Ended)

Read Also – What is Array

Read Also – What is Object Oriented Programming

Read Also – What is Polymorphism

Read Also – What is C Programming language

Read Also – What is OOPs

Read Also – What is Programming language

Click here to read Differences between C and C++ Programming Languages

Read Also – What is Data Structure 

Read Also – What is Linked List

2 Comments

  1. Deepanshu Saxena February 27, 2018
    • Saloni shaktawat February 7, 2019

Leave a Reply