Design Circular Queue | Live Coding with Explanation | Leetcode - 622

Поділитися
Вставка
  • Опубліковано 15 гру 2024

КОМЕНТАРІ • 15

  • @AlgorithmsMadeEasy
    @AlgorithmsMadeEasy  3 роки тому +1

    We hope you all are enjoying our videos!!! Don't forget to leave a comment!!! Please like the video to support us!!!
    Questions you might like:
    ✅✅✅[ Tree Data Structure ] : ua-cam.com/play/PLJtzaiEpVo2zx-rCqLMmcFEpZw1UpGWls.html
    ✅✅✅[ Graphs Data Structure ] : ua-cam.com/play/PLJtzaiEpVo2xg89cZzZCHqX03a1Vb6w7C.html
    ✅✅✅[ January Leetcoding Challenge ] : ua-cam.com/play/PLJtzaiEpVo2wCalBcRcNjXQ0C6ku3dRkn.html
    ✅✅✅[ December Leetcoding Challenge ] : ua-cam.com/play/PLJtzaiEpVo2xo8OdPZxrpybGR8FmzZpCA.html
    ✅✅✅[ November Leetcoding Challenge ] : ua-cam.com/play/PLJtzaiEpVo2yMYz5RPH6pfB0wNnwWsK7e.html
    ✅✅✅[ August Leetcoding Challenge ] : ua-cam.com/play/PLJtzaiEpVo2xu4h0gYQzvOMboclK_pZMe.html
    ✅✅✅July Leetcoding challenges: ua-cam.com/play/PLJtzaiEpVo2wrUwkvexbC-vbUqVIy7qC-.html
    ✅✅✅June Leetcoding challenges: ua-cam.com/play/PLJtzaiEpVo2xIfpptnCvUtKrUcod2zAKG.html
    ✅✅✅May Leetcoding challenges: ua-cam.com/play/PLJtzaiEpVo2wRmUCq96zsUwOVD6p66K9e.html
    ✅✅✅Cracking the Coding Interview - Unique String: ua-cam.com/play/PLJtzaiEpVo2xXf4LZb3y_BopOnLC1L4mE.html
    Struggling in a question??
    Leave in a comment and we will make a video!!!🙂🙂🙂

  • @uditagrawal6603
    @uditagrawal6603 3 роки тому

    We can also initialize rear with -1 in that case we might not need to handle special case where check Is made for the empty part, WDYT?

  • @poorpanda9033
    @poorpanda9033 Рік тому +1

    Thank youuuuuu

  • @palashvij7935
    @palashvij7935 3 роки тому +1

    Consistency = algorithms made easy

  • @Cloud-577
    @Cloud-577 2 роки тому

    can someone help me understand why a list over a linked list?

  • @jamesvick8066
    @jamesvick8066 3 роки тому

    Very nicely explained

  • @philfrizzle3419
    @philfrizzle3419 3 роки тому +2

    Could you explain the mod line a little more?
    rear = rear % q.length
    front = front % q.length

    • @AlgorithmsMadeEasy
      @AlgorithmsMadeEasy  3 роки тому +2

      when the index reached the last index suppose the length of the array is 6 and the rear or front index is 5.
      Now when I add 1 more element we need to move the rear to index 6 which is not possible so the new index becomes 6mod6 which is 0. we are using mod because the queue is circular and the last index is connected to 0 indexes.
      hope that clarifies things for you.

    • @philfrizzle3419
      @philfrizzle3419 3 роки тому +1

      @@AlgorithmsMadeEasy That makes so much sense. It just clicked. Thank you for the video.

    • @Tarunkumar-gs4mm
      @Tarunkumar-gs4mm 3 роки тому

      @@AlgorithmsMadeEasy thax man! for explanation
      agar comment maa aa k nhi dkeha hot to sir k upar se chala gaya tha.

  • @oqant0424
    @oqant0424 2 роки тому

    well explained

  • @breakpause6082
    @breakpause6082 2 роки тому

    thank you!

  • @shivendrasonkar6571
    @shivendrasonkar6571 3 роки тому

    thank you for wonderfull explanation

  • @Iamnoone56
    @Iamnoone56 3 роки тому +2

    you didnt explained the main thing for which many of us were here "%"!