JOIN us on
WhatsApp Group Join Now
Telegram Join Join Now

हिंदी माध्यम नोट्स

Categories: C Language in hindi

Queues : Basic in c language in hindi , what is Queue in c , c कंप्यूटर भाषा में क्यु क्या है हिंदी में

c कंप्यूटर भाषा में क्यु क्या है हिंदी में Queues : Basic in c language in hindi , what is Queue in c :-
Queues एक data type है जो की FIFO concept पर आधरित है |इस data structure का use computing मे किया जाता है |Queues मे जो element पहले आयगा वो पहले exit होगा |जैसे ticket window मे लगी line|क्योकि जो person पहले आएगा उसे पहले ticket मिलेगी |
Queues मे data को Queues के front मे add किया जाता है और data को डिलीट को Queues के end मे से किया जाता है |Queues मे जहा से add operation perform होता है उसे front कहते है |और जहा से डिलीट operation perform होगा use rear कहते है |
किसी Queues को define करने के लिए निन्म variable को use किया जाता है :-
1.Queues[] : ये array होती है जो की Queues के तरह कार्य करेगी
2.size: ये Queues array की size होती है |
3.front : ये Queues का front भाग होता है जहा से insert operation perform होता है |
4.rear : ये Queues का पीछे वाला भाग होता है जहा से डिलीट operation perform होता है |Queues मे निन्म operation perform हो सकते है :-
1.EnQueues
इस function मे Queues मे data को add किया जाता है |अगर Queues फुल होती है तब इसे overfull condition कहते है |इसकी algorithm है :-
1.सबसे पहले rear की value check होती है |
2 अगर rear की value arraysize से सामान होती तब
2.i-overfull condition का message आ जाता है \
2.ii-अन्यथा  Queues के rear position पर item insert हो जाता है और Queues के rear की position बढ़ जाती है |
इस operation की complexity O(1) होती है क्योकि इसमें एक ही बार operation होता है |


2.DeQueues
इस function का use , Queues से data को डिलीट करने के लिए किया जाता है |अगर Queues empty है तब underflow condition आ जाती है |इसकी algorithm है :-
1.सबसे पहले condition check की जाती है |
2.अगर Queues का front और rear की value same होती है तब
2.i underflow condition आ जाती है |
2.ii-Queues के front पोसितिओंके element को ‘0’ से रिसेट कर देते है |और front को एक position से decrement कर देगे |

3.front()
इस function मे Queues के front position पर उपस्थित element को return किया जाता है |अगर Queues array का नाम Queues[] है तब
int front(Queues[])
{
return(Queues[front]);
}

4.Size ()
इस function का use , Queues की size को calculate करने के लिए किया जाता है |अगर Queues array का नाम Queues[] है जिसमे
front : जो की Queues[] के first position की value को contain करता है |
rear : ये Queues[] के last position की value को contain करता है |
तब Queues की size = rear-front;
size(int rear,int front)
{
size =rear-front;
return(size);
}


5.is empty ()
ये function Queues के status को check करता है |अगर function ‘1’ return करे तो Queues empty है |अन्यथा Queues  मे element है |

Double Ended Queues


Queues दो प्रकार की होती है इस article मे केवल Double Ended Queues को पढेगे |Circular Queues के लिए एक अलग से chapter उपलब्ध है |
single Queues मे,कोई भी data Queues  के front से डिलीट होता है और insert Queues  के rear होता है |लेकिन Double Ended Queues मे data दोनों side ( front या rear ) से insert और डिलीट हो सकता है |इसलिए इसे Double Ended Queues भी कहते है |
Double Ended Queues मे निन्म operation perform हो सकते है :-
1.insert at back side
इस operation की algorithm,Queues की enQueues के तरह होती है | इसकी algorithm है :-
1.सबसे पहले rear की value check होती है |
2 अगर rear की value arraysize से सामान होती तब
2.i-overfull condition का message आ जाता है |
2.ii-अन्यथा  Queues के rear position पर item insert हो जाता है और Queues के rear की position बढ़ जाती है |
2.Delete from back
इस operation के लिए algorithm होती है :-
1.condition check की जाती है |
2.अगर front और rear की value same होती है तब
2.i- underflow की condition आ जाती है |
2.ii-अन्यथा rear को rear-1 से set करते है और Queues के rear position पर ‘0’ को assign करते है |

3.Insert at front
इस operation के लिए algorithm होती है :-
1.condition check की जाती है |
2.अगर front की value  1 होती है तब
2.i- item can not add का message आ जाता  है |
2.ii-अन्यथा front  को front -1 से set करते है और Queues के front position पर data assign करते है |


4.Delete at front
इस operation की algorithm,Queues की enQueues के तरह होती है | इसकी algorithm है :-
1.सबसे पहले front  की value check होती है |
2 अगर rear और front की value सामान होती तब
2.i-overfull condition का message आ जाता है |
2.ii-अन्यथा  Queues के front  position पर item insert हो जाता है और Queues के front की position बढ़ जाती है |

5.front()
इस function मे  Double Ended Queues के front position पर उपस्थित element को return किया जाता है |अगर Queues array का नाम Queues[] है तब
int front(Queues[])
{
return(Queues[front]);
}

6.rear ()
इस function मे Double Ended Queues के rear position पर उपस्थित element को return किया जाता है |अगर Queues array का नाम Queues[] है तब
int front(Queues[])
{
return(Queues[rear-1]);
}

इसके अलावा  size()  और is empty () function भी perform होते है |जिसकी  algorithm नार्मल Queues की तरह होती है |

Sbistudy

Recent Posts

सती रासो किसकी रचना है , sati raso ke rachnakar kaun hai in hindi , सती रासो के लेखक कौन है

सती रासो के लेखक कौन है सती रासो किसकी रचना है , sati raso ke…

23 hours ago

मारवाड़ रा परगना री विगत किसकी रचना है , marwar ra pargana ri vigat ke lekhak kaun the

marwar ra pargana ri vigat ke lekhak kaun the मारवाड़ रा परगना री विगत किसकी…

24 hours ago

राजस्थान के इतिहास के पुरातात्विक स्रोतों की विवेचना कीजिए sources of rajasthan history in hindi

sources of rajasthan history in hindi राजस्थान के इतिहास के पुरातात्विक स्रोतों की विवेचना कीजिए…

3 days ago

गुर्जरात्रा प्रदेश राजस्थान कौनसा है , किसे कहते है ? gurjaratra pradesh in rajasthan in hindi

gurjaratra pradesh in rajasthan in hindi गुर्जरात्रा प्रदेश राजस्थान कौनसा है , किसे कहते है…

3 days ago

Weston Standard Cell in hindi वेस्टन मानक सेल क्या है इससे सेल विभव (वि.वा.बल) का मापन

वेस्टन मानक सेल क्या है इससे सेल विभव (वि.वा.बल) का मापन Weston Standard Cell in…

3 months ago

polity notes pdf in hindi for upsc prelims and mains exam , SSC , RAS political science hindi medium handwritten

get all types and chapters polity notes pdf in hindi for upsc , SSC ,…

3 months ago
All Rights ReservedView Non-AMP Version
X

Headline

You can control the ways in which we improve and personalize your experience. Please choose whether you wish to allow the following:

Privacy Settings
JOIN us on
WhatsApp Group Join Now
Telegram Join Join Now