Circular Queue Implementation - Linked List

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

КОМЕНТАРІ • 16

  • @BlueTreeCode
    @BlueTreeCode  5 років тому

    Hey Everyone! Thanks for checking out my video! Don't forget to Like, Subscribe, and MOST IMPORTANTLY click that Notification Bell for updates! :)

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

    Great quality. I don't understand why this channel is underrated.

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

      Hi Mathi Alagan, thank you so much. If you enjoy this content, please feel free to share these videos.

  • @Pedro381ispro
    @Pedro381ispro 5 років тому +3

    Great animations, clear and understandable! thanks! Also:
    Any way to not have to throw the Exception when rear == null? because then get "cannot find symbol" on this exception which means I have to create my own exception which is annoying. thanks!

    • @BlueTreeCode
      @BlueTreeCode  5 років тому

      Thanks for the kind comment, SkonerTM. Well, it seems to me like your code is not compiling because you need to import java.util.NoSuchElementException at the top of your file. That would pretty much fix your problem. Now, if you want to exclude that import in general, another way I would do this is to use the Integer class instead of the 'int' primitive as a return type for the Dequeue and Peek methods. That would allow you to return 'null' instead of throwing an Exception as a way to indicate that the queue is empty. Hope this helps :)

  • @Haifa658
    @Haifa658 Рік тому

    Thanks bro I would’ve failed my data structure course if it wasn’t for your videos

    • @BlueTreeCode
      @BlueTreeCode  7 місяців тому

      You're very welcome! I'm glad you passed your Data Structures course! Don't forget to like and share as it helps out the channel.

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

    Can we build a Queue using the regular linked list instead of a circular one?
    We can implement addLast and removefirst methods in a regular linked list. Correct me if I'm wrong.

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

      Hi Hari, you can definitely use a non-circular linked list. Enqueue and dequeue will still be O(1) time. Hope this helps :)

  • @themonster4759
    @themonster4759 Рік тому

    this is easy unlike circular queue in array

  • @gayatridhekane1658
    @gayatridhekane1658 5 років тому +1

    Very nice...

  • @philipT8989
    @philipT8989 4 роки тому +1

    how do I omplement double linked list circular queue?

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

    can u show me a toString method for this

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

    how do i make a method to print this queue

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

    Opp