4.8 Implementation of DEQUE using Circular Array | Data Structures Tutorials

แชร์
ฝัง
  • เผยแพร่เมื่อ 12 ก.ย. 2024

ความคิดเห็น • 257

  • @beastslayer5893
    @beastslayer5893 ปีที่แล้ว +71

    this course is far better than code with harry dsa i can say that i have completed his whole playlist but the way you make us understand is great ... you are the goat for teaching dsa

    • @adarsh_kr_maurya
      @adarsh_kr_maurya 7 หลายเดือนก่อน +2

      Bro both are best.. in terms of their purposes...

    • @mirzakhursheedabbas4184
      @mirzakhursheedabbas4184 5 หลายเดือนก่อน +4

      Bro when it matter dsa jenny mam but comes to programming harry bhai>>>>>>>>>> than any indian youtuber.

  • @JahanzaibNiazi
    @JahanzaibNiazi 5 หลายเดือนก่อน +7

    I have never ever seen some one else teaching the tough concepts of DSA in such a best way. You are doing very good thing for the humanity.

  • @harshgupta4240
    @harshgupta4240 3 ปีที่แล้ว +11

    mam...i think this is the best video that is available on youtube❤❤
    you have explained the complete concept of deque using circular array (with implementation of all the operations in CODE) that too in such a simple way
    NOT at all an easy task

  • @offensegamingtelugu4878
    @offensegamingtelugu4878 2 หลายเดือนก่อน +4

    Even after 4 yrs, your channel is 👌🙏🙌💯✅

  • @bhawnachoudhary8167
    @bhawnachoudhary8167 4 ปีที่แล้ว +74

    Mam when you will upload lecture on priority queue

    • @codewithdrv7521
      @codewithdrv7521 4 ปีที่แล้ว +10

      for priority queue (explanation with code), you can checkout my channel, might be useful. :)

    • @monstersp8331
      @monstersp8331 2 ปีที่แล้ว +1

      @@codewithdrv7521 ascending order priority queue using array hai aapke video mai?

  • @John12685
    @John12685 4 ปีที่แล้ว +33

    You should also cover some example programs (at least 1 or 2) after teaching any data structure related to it. It will be helpful to grasp the practical usage of data structures in a better way. Thanks 😊

  • @praveshkarki8696
    @praveshkarki8696 4 ปีที่แล้ว +5

    Your channel really deserve more growth . The way you explain the things are pretty impressive and clear .I really appreciate your time and hard work .Thank you very much .

  • @amalrosh9846
    @amalrosh9846 4 ปีที่แล้ว +14

    I'm in love with these videos
    Please release the next one

  • @starkboy476
    @starkboy476 4 ปีที่แล้ว +46

    U haven't added priority queue in ur playlist

  • @team4b68
    @team4b68 4 ปีที่แล้ว +11

    I skipped the textbook topic for deck, hoping to find a way to learn it. This video turned to be that way. Best explanation!!Tysm ma'am! :)

  • @ishajain7879
    @ishajain7879 3 ปีที่แล้ว +6

    Ma'am, its such a bliss for me to have a complete course of DS in such splendid way. I m enjoying this course ,but it would be more satisfactory if it is complete. you told in video itself that u cover priority queue but i cant find it. plz post it ma'am .

  • @santoshibora1892
    @santoshibora1892 4 ปีที่แล้ว +3

    I don't think that anybody have any prblm if the video makes lengthy .
    thank u its really useful

  • @mukkalanagaraju
    @mukkalanagaraju 4 ปีที่แล้ว +4

    Way of explanation is very nice with easy english words, everyone can understand very easily... Keep rocking ma'am.....

  • @aryanmaniyar3475
    @aryanmaniyar3475 11 หลายเดือนก่อน +2

    What a great video indeed mam! Thank you so so so much mam :) Anyone who is looking for there concepts to get cleared, this video is the way to go!

  • @monikadesai8251
    @monikadesai8251 ปีที่แล้ว

    Respected dear Jenny mam, Thank u so much for these DS tutorials. Today I have completed these basic linear data structures [Array, L.L., Stack & Queue]. You've explained each n every concept very nicely. Your teaching is very perfect. Academic teacher also not teaches as perfect as u even after taking much fees. Proud of u. Thankful & Well wishes from me. 😇🌹

  • @beastslayer5893
    @beastslayer5893 ปีที่แล้ว

    i can say that for dsa this channel is the best .... i dont mean that u should not follow code with harry or anything like that .. but the content which you are providing at free of cost is far better than any paid course i can say that

  • @SujataDas-hz4hp
    @SujataDas-hz4hp 3 ปีที่แล้ว +7

    When will u upload priority queue.

  • @kiranchandu2174
    @kiranchandu2174 4 ปีที่แล้ว +37

    I don't know why I didn't get this type of teachers in my college. If she was my teacher I never ever going to miss my class

    • @Yogesh-bp4vv
      @Yogesh-bp4vv 3 ปีที่แล้ว +4

      what you think, understanding a single topic with your full mindset is easy but understanding a full book and retain its in memory is so difficult. that's the same thing she/mam do. she understand a single topic deeply collect information about that topic deeply from web,book etc and then compress it, make a 30+ min video, but she didn't known everything. she has knowledge only about this. teaching in a university is much difficult then this, every year repeating same thing...

    • @kumpulantugas8430
      @kumpulantugas8430 3 ปีที่แล้ว +1

      smart, and beautiful right

    • @sooryanshsingh2957
      @sooryanshsingh2957 ปีที่แล้ว +1

      @@Yogesh-bp4vv Knowledge is of no use in teaching field if one cannot properly impart it to students.
      In university/school also a teacher get a 40min lecture for which he/she can prepare before hand and compress the knowledge from various source
      and brush up their topics, so that they can explain the concept better in class.
      But, most of the teachers fails to do so, there are always some exceptions and those exceptions later become the favourite teacher for students.

    • @AayushTayalBCH
      @AayushTayalBCH ปีที่แล้ว

      @@sooryanshsingh2957 Yeah, exactly,...totally agreed.

    • @user-bw1sg2wm1k
      @user-bw1sg2wm1k 6 หลายเดือนก่อน

      @@Yogesh-bp4vv Then why should we pay lakhs together fees ?? The very primary task of any lecture is to make them students understand clearly .. in that case the jenny mam is an 100 % good lecture

  • @utkarshrastogi3119
    @utkarshrastogi3119 4 ปีที่แล้ว +3

    Very well explained ma'am. You deserve much more likes and subscribers!

  • @dishantitaliya1912
    @dishantitaliya1912 ปีที่แล้ว

    Before watching this video d queue it was very toughest concept for me but after the watching of this video i got the concept totally. Thank you ma'am.u really deserves much growth 📈.

  • @nishanty7392
    @nishanty7392 4 ปีที่แล้ว +19

    No one:
    Literally No one:
    Le Me: Yaar ye kitni Awesome hai yaar 😆

  • @adrijalodh1480
    @adrijalodh1480 9 หลายเดือนก่อน +1

    Your videos are really very helpful mam. Keep up making this kind of videos

  • @bindhu152
    @bindhu152 11 หลายเดือนก่อน +3

    maam can you please make a video on priority queues

  • @dscreations1955
    @dscreations1955 26 วันที่ผ่านมา +1

    You the best teacher mam❤

  • @abrahamiberkleid1829
    @abrahamiberkleid1829 11 หลายเดือนก่อน +1

    Jenny you are the MVP !

  • @margnasviv5945
    @margnasviv5945 4 ปีที่แล้ว +2

    Way of teaching ds is excellent..please do videos on complier design

  • @saitejapalli6533
    @saitejapalli6533 3 ปีที่แล้ว +3

    Mam.. I'm from EEE. By watching ur videos on DS I helped my frnd to pass his exam who is from CSE

  • @francksomarriba1593
    @francksomarriba1593 2 ปีที่แล้ว

    Thank you so much, you are the reason why I get to pass my data structures class

  • @Sushil2874
    @Sushil2874 4 ปีที่แล้ว +3

    Very well explained mam..!!
    Thanks..!!

  • @sagnikpatra9391
    @sagnikpatra9391 4 ปีที่แล้ว +2

    This is not even my topic but sunkar atcha lagta hai ...
    Gyaan jahase bhi mile lelo

  • @alixaprodev
    @alixaprodev 4 ปีที่แล้ว +4

    I am your big fan maam please i have created an algorithm for sorting please tell me its name.
    "*def sortt(list):
    n=len(list)
    for i in range(n-1):
    temp=list [i]
    if list[i]>list[i+1]:
    list[i]=list[i+1]
    list[i+1]=temp
    return print(list)"*

    sortt([3,1,2,6,4])

  • @wukongop717
    @wukongop717 ปีที่แล้ว +1

    Mam what will happen in dequeuerear() if r is 0, but f is also 0? Will it go for the 2nd case or 3rd case?

  • @Priya_happyface
    @Priya_happyface 4 ปีที่แล้ว +1

    Mam u r best teacher and best person also

  • @misty6129
    @misty6129 9 หลายเดือนก่อน +1

    Shouldn't their also be a condition if front = rear - 1 while checking whether the stack is full or not

  • @amitbudhiraja4135
    @amitbudhiraja4135 3 ปีที่แล้ว

    BEST TEACHER I HAVE EVER SCENE and as well as best beautiful teacher as well

  • @user-zn4xn9qx2n
    @user-zn4xn9qx2n 9 หลายเดือนก่อน +1

    you are too good in terms of explanation Mam

  • @programmerji3113
    @programmerji3113 4 ปีที่แล้ว

    Mam you are really very great teacher.
    You taught everything about deque very well.
    Excellent and wonderful explanation in proper way.
    Thank you very much mam
    ⭐⭐⭐⭐⭐

  • @AmitSharmaTheMariachi
    @AmitSharmaTheMariachi 4 ปีที่แล้ว +2

    Thanks for such a informative video. Please make videos on graphs also.

  • @bobow4075
    @bobow4075 11 หลายเดือนก่อน +1

    I wish my teacher teached the class like this instead of blindly reading powerpoints.

  • @vakhariyajay2224
    @vakhariyajay2224 2 ปีที่แล้ว +1

    Thank you very much. You are a genius.

  • @nikitagora2702
    @nikitagora2702 4 ปีที่แล้ว +8

    Mam plz priority queue as soon as possible exam are coming next week

  • @akshaysharma8235
    @akshaysharma8235 ปีที่แล้ว +1

    Flawless Explanation 🙏🙏🙏🙏🙏🙏🙏🙏🙏

  • @kshitijsabale7534
    @kshitijsabale7534 4 ปีที่แล้ว +1

    You Saved My A$$ .... I owe you one 👍

  • @arunnishad7733
    @arunnishad7733 ปีที่แล้ว

    Nice explanation Ma'am
    Thank you so much 💓💓
    I was finding deque very tough but you made it very easy

  • @scenairo698
    @scenairo698 3 ปีที่แล้ว

    Best Explanation Ever. Love from Pakistan

  • @ganeshcristiano3877
    @ganeshcristiano3877 4 ปีที่แล้ว +2

    Thank you mam... it's been helpful for us

  • @samikshamahure
    @samikshamahure 3 ปีที่แล้ว +1

    The condition of while loop in display function should be-
    While(i !=rear+1)
    Not rear
    Right?

    • @AZ-be5un
      @AZ-be5un 6 หลายเดือนก่อน

      Yes, you're right, or better, it should be (rear+1)%N

  • @pervejahmed5125
    @pervejahmed5125 11 หลายเดือนก่อน +1

    So far best.

  • @prishitasharma6785
    @prishitasharma6785 4 ปีที่แล้ว +3

    Ma'am please can you explain skip lists and self organising lists topic.?

  • @dinakarshetty1211
    @dinakarshetty1211 ปีที่แล้ว +3

    Instead of (front=rear+1)||(f=0&&r=n-1)
    We could just written (r+1)%n=f

  • @rishankmishra4140
    @rishankmishra4140 4 ปีที่แล้ว

    Mam.. prefer any book for DS...
    Ur's lectures are very good mam... I understood very easily all the concepts..

  • @SaifAli-mt2cl
    @SaifAli-mt2cl 4 ปีที่แล้ว +2

    So nice of u thanks for the lecture

  • @ARSHADKHAN-sy7vb
    @ARSHADKHAN-sy7vb 3 ปีที่แล้ว

    mam you teach all corner cases soo well that coder will never forget any corners while coding thanks and I cant believe i am watching this for free.

  • @rishankmishra4140
    @rishankmishra4140 4 ปีที่แล้ว +5

    Mam when will u upload priority queues??
    Please upload it mam as soon as possible...

    • @codewithdrv7521
      @codewithdrv7521 4 ปีที่แล้ว +1

      brother, there is an explanation video with code for the implementation of priority queue (using linked list), on my channel, might be helpful:)

  • @tushardimri1796
    @tushardimri1796 2 ปีที่แล้ว

    Really wonderful explanation. Thank you very much for this video.

  • @juhiajwani4170
    @juhiajwani4170 4 ปีที่แล้ว

    Ma'am wat an amazing explanation !! You are the besttttt .

  • @mathematics4103
    @mathematics4103 ปีที่แล้ว +1

    Thank you so much

  • @akbarahmad5245
    @akbarahmad5245 4 ปีที่แล้ว +6

    Hey mam! You are doing great job mam. Mam, i am also currently teaching in the University as a visiting lecturer. Dear mam, can you share any good link related to Mcq’s for OS, CCNA, Ds, and DB. I have already pleaded that if you can?And mam your email please? I have been watching your channel since January ,2019.

  • @aakash185
    @aakash185 4 ปีที่แล้ว

    Crystal clear explanation , thankyou Ma'am

  • @anandprakashsingh5683
    @anandprakashsingh5683 ปีที่แล้ว

    Literally exam saver preparation 🙌 🙏 thank you ma'am

  • @vishwarana4434
    @vishwarana4434 4 ปีที่แล้ว

    bestest teacher💯

  • @harshsaxena05
    @harshsaxena05 4 ปีที่แล้ว +1

    Jitna accha padhati ho utini acchi khud bhi lagti ho wow deadly combination ........ lecture is good but ab mam ko dekhne ke chakkar me padhai ho ni ri kal exam hai.. kya karein

  • @rahulrajendran8815
    @rahulrajendran8815 3 ปีที่แล้ว +1

    maam please prepare a video for priority queue pleaseeeeeeee......your classes are very very understandable.....there is no proper video class for priority queue.....

  • @hometvfirestick
    @hometvfirestick 3 ปีที่แล้ว

    mam, priority queue ni dala aapne?
    and ye circular array se kr rhi ho
    doubly linked list se v kr skte hai na
    wo jyada easy pdega

  • @mr.thakur2927
    @mr.thakur2927 10 หลายเดือนก่อน +1

    Nice explanation mam ❤

  • @sonudas7112
    @sonudas7112 4 ปีที่แล้ว +2

    mam, please make some videos on backtracking..........i found this topic very difficult

  • @hjklmn9526
    @hjklmn9526 3 ปีที่แล้ว

    Thank you, Mam for this wonderful lecture. I tried writing a Deque ADT (Python 3) using circular array using the concepts you taught. Let me know your feedback :)
    Chief features
    ---------------------
    1. Clean code, I have written simple functions for checking if queue is full, single element is present in array and so on
    2. Tried to keep it DRY - short single focused methods.
    3. Code appears like reading a prose. When you read a function top-down, you understand the flow
    4. Private methods at the bottom and grouped together.
    class Deque:
    def __init__(self, initial_capacity=5):
    self._front = -1
    self._rear = -1
    self._data = [None] * initial_capacity
    self._size = 0
    def enqueue_front(self, element):
    if self.is_empty():
    self._front = self._rear = 0
    self._set_element_at_position(self._front, element)
    elif self.is_full():
    raise Exception("Queue is full")
    elif self._does_front_point_at_first_element():
    self._front = len(self._data) - 1
    self._set_element_at_position(self._front, element)
    else:
    self._front -= 1
    self._set_element_at_position(self._front, element)
    self._increment_size()
    def enqueue_rear(self, element):
    if self.is_empty():
    self._front = self._rear = 0
    self._set_element_at_position(self._rear, element)
    elif self.is_full():
    raise Exception("Queue is full")
    elif self._does_rear_point_at_last_element():
    self._rear = 0
    self._set_element_at_position(self._rear, element)
    else:
    self._rear += 1
    self._set_element_at_position(self._rear, element)
    self._increment_size()
    def _set_element_at_position(self, position, element):
    self._data[position] = element
    def is_empty(self):
    return self._size == 0
    def is_full(self):
    return self._size == len(self._data)
    def print_queue(self):
    if self.is_empty():
    raise Exception("Queue is empty")
    print(self._data)
    def dequeue_front(self):
    data = None
    if self.is_empty():
    raise Exception("Queue is empty")
    elif self._is_single_element_left():
    data = self._delete_element_at_position(self._front)
    self._make_front_and_rear_point_to_same_element()
    self._decrement_size()
    elif self._does_front_point_to_last_element():
    data = self._delete_element_at_position(self._front)
    self._front = 0
    self._decrement_size()
    else:
    data = self._delete_element_at_position(self._front)
    self._front += 1
    self._decrement_size()
    return data
    def dequeue_rear(self):
    data = None
    if self.is_empty():
    raise Exception("Queue is empty")
    elif self._is_single_element_left():
    data = self._delete_element_at_position(self._rear)
    self._make_front_and_rear_point_to_same_element()
    self._decrement_size()
    elif self._does_rear_point_to_first_element():
    data = self._delete_element_at_position(self._rear)
    self._rear = len(self._data) - 1
    self._decrement_size()
    else:
    data = self._delete_element_at_position(self._rear)
    self._rear -= 1
    self._decrement_size()
    return data
    def _is_single_element_left(self):
    return self._front == self._rear
    def _make_front_and_rear_point_to_same_element(self):
    self._front = self._rear = -1
    def _delete_element_at_position(self, position):
    data = self._data[position]
    self._data[position] = None
    return data
    def _increment_size(self):
    self._size += 1
    def _decrement_size(self):
    self._size -= 1
    def _does_front_point_to_last_element(self):
    return self._front == len(self._data) - 1
    def _does_rear_point_to_first_element(self):
    return self._rear == 0
    def _does_rear_point_at_last_element(self):
    return self._rear == len(self._data) - 1
    def _does_front_point_at_first_element(self):
    return self._front == 0
    deque = Deque()
    deque.enqueue_front(2)
    deque.print_queue()
    deque.enqueue_front(4)
    deque.print_queue()
    deque.enqueue_rear(6)
    deque.print_queue()
    deque.enqueue_rear(8)
    deque.print_queue()
    deque.enqueue_front(10)
    deque.print_queue()
    print(deque.dequeue_front())
    deque.print_queue()
    print(deque.dequeue_front())
    deque.print_queue()
    print(deque.dequeue_rear())
    deque.print_queue()
    print(deque.dequeue_rear())
    deque.print_queue()
    print(deque.dequeue_rear())

  • @rekhakansal8370
    @rekhakansal8370 ปีที่แล้ว

    Very amazing explanation mam...thank you very very much mam.

  • @actionbeam001
    @actionbeam001 12 วันที่ผ่านมา

    here f and r means front and rear
    so we can write f and r instead of front and rear is that true?
    i think im right becoz we never declared anything like front and rear in the program!!

  • @satwik8072
    @satwik8072 6 หลายเดือนก่อน

    instead of taking 2 else for insertion, can't we just one else in which we take front=(front-1)%N ??
    that will satisfy both if else and else part?..

  • @meetkcs
    @meetkcs ปีที่แล้ว

    Awesome Explanation !!

  • @arvindersingh9863
    @arvindersingh9863 4 ปีที่แล้ว +3

    Also on priority queue.....

  • @ritikabali6466
    @ritikabali6466 3 ปีที่แล้ว

    very nicely and properly explained.

  • @bhuvanchandrajoshi9138
    @bhuvanchandrajoshi9138 4 ปีที่แล้ว +1

    I like your lectures

  • @pradnyakharade3718
    @pradnyakharade3718 3 ปีที่แล้ว +1

    Maam plz upload video on priority queue from last 1 year everyone is asking for it just because you teach soo good! But still you havent uploaded any video in addition you havent replied though about it .
    Will it come(y/n)?

  • @tanish_2_4
    @tanish_2_4 3 ปีที่แล้ว +1

    Mam why u don't make videos on priority queue ???

  • @theamazing4365
    @theamazing4365 3 ปีที่แล้ว

    nice video mam looking forward for more.....❤️

  • @bharatuttamchandani5121
    @bharatuttamchandani5121 4 ปีที่แล้ว

    Is like insert(right)
    Insert(left)
    Delete(right)
    Delete(left)
    ?

  • @Bensio010
    @Bensio010 2 ปีที่แล้ว

    mam at the time of void enqueueRear , the final else condition is not much accurate, since it given as r++, why there is no r- -?

  • @ravikant2164
    @ravikant2164 3 ปีที่แล้ว +1

    For increment :- Rear = (Rear + 1)%N
    For decrement :- Front =(Front + N - 1)%N

    • @GamingwithCasss
      @GamingwithCasss 2 ปีที่แล้ว

      are you referring to adding a front element to a queue and adding a rear element to a queue. also what is N. is that the for example "array.length".

  • @smiletripathi3839
    @smiletripathi3839 2 ปีที่แล้ว

    Thanks for your free videos and excellent explanation.

  • @yathinkversegulugulu
    @yathinkversegulugulu ปีที่แล้ว

    Best teacher 🎉🎉

  • @oliverodyssey2002
    @oliverodyssey2002 10 หลายเดือนก่อน +1

    display function is wrong

  • @harshmistry7238
    @harshmistry7238 3 ปีที่แล้ว

    thank you so much mam i can easily understand

  • @ayushkadyan7261
    @ayushkadyan7261 2 ปีที่แล้ว

    as mam you say we are not using linear array as base data structure in deque because we can not able to use memory completely but mam is this only reason or if we are using linear array then once we start inserting data from front then we can not able to do insertion at rear

  • @adelinghanayem2369
    @adelinghanayem2369 3 ปีที่แล้ว

    Excellent teacher !!!!! Keep on the good work !!!

  • @niravyogeshasher7082
    @niravyogeshasher7082 4 ปีที่แล้ว

    Thanks, really useful video lecture

  • @onlinekhabar3835
    @onlinekhabar3835 2 ปีที่แล้ว

    *Greater than winning is never giving up*

  • @InkedEnsight
    @InkedEnsight 4 ปีที่แล้ว +1

    Very good 👍 explanation

  • @johnreynolds6432
    @johnreynolds6432 4 ปีที่แล้ว

    Very good explanation!

  • @abemelekdaniel8913
    @abemelekdaniel8913 ปีที่แล้ว +1

    good job

  • @santanukumarpandapanda7588
    @santanukumarpandapanda7588 ปีที่แล้ว

    Thank you mam you helping me a lot

  • @continnum_radhe-radhe
    @continnum_radhe-radhe ปีที่แล้ว +1

    Thank you soo much mam 🔥🔥🔥

  • @diskokaktus
    @diskokaktus 2 ปีที่แล้ว

    Great lesson!

  • @mehroosali
    @mehroosali 3 ปีที่แล้ว

    excellent video. one of the best explanation for a complex topic.

  • @chaithanyachaitu9174
    @chaithanyachaitu9174 3 หลายเดือนก่อน

    Madam in enquerear operation if front is at 0 and rear at size -1 . Is it working madam

  • @roshanraut3093
    @roshanraut3093 3 ปีที่แล้ว

    Amazing explanation.

  • @gurupreetsingh8347
    @gurupreetsingh8347 4 ปีที่แล้ว +1

    mam thanks for ol this, but mam plz make complete videos on priority-queues bahut imp topic hai yeh bhi.......

    • @codewithdrv7521
      @codewithdrv7521 4 ปีที่แล้ว

      there is a explanation video with code for the implementation of priority queue (using linked list), on my channel, might be helpful:)

  • @soniasethi7005
    @soniasethi7005 ปีที่แล้ว +1

  • @musicalsneha4202
    @musicalsneha4202 3 ปีที่แล้ว +1

    mam have u taught priority queue? if yes then plz give me the link.....thank u :)