Circular Linked List | Insert, Delete, Complexity Analysis

preview_player
Показать описание
Learn Circular Linked Lists through animations, code and explanations.

In this video, I go through Circular Linked Lists in detail using Java. I cover operations such as insert at front, insert after a node, insert at end, delete at front, delete after a node, delete at end. I also cover Big O complexity analysis for these operations.
Рекомендации по теме
Комментарии
Автор

Important Note: Similar to the previous Linked List videos, for the deletion methods, since the method is returning a reference, you should update toDelete's reference such that it's no longer pointing to the list, that way you will not be able to reach the list by manipulating toDelete.

BlueTreeCode
Автор

thank you so much, so easy explanation. It helped me a lot.

kyledecena
Автор

Dont stop uploaading about data structure and algorithm bro this is help me a lpt

johnpaulbancayrin
Автор

great video. but would really appreciate it if you slowed down while talking as I had to replay some parts of the video to actually catch up with what you were saying. Good luck with the other videos!

janaal-sokhon
Автор

nice explanation..really was stuck with circular linked list

Rohit-jkzi
Автор

I'm kinda a newbie but I think in the addAfter method you forgot the case in which we add a node after the last node. It might be a wrong take, but how I interpret it is that in this case the newly created node should become the new last node. So inside the if we should add that if curr==last then last=n.

amblypygi
Автор

yoh fire outro, nice touch. I couldn't find the subscribe button though.

money
Автор

Does the last Node have a Pointer to the first Node as its prev?

kaitokid
Автор

thanks a lot sir, I have a doubt suppose we have two pointers maintained one head and another tail then time complexity to insert at beg, end, after element will be??

Ajaysharma-rixi
Автор

As an absolute beginner, i found this rather hard to comprehend at time 2:13 [last.next does not point to n.next| it still pointing to itself(visual) ]. and n.next looks as if it is pointing to 3. Yet when I am reading the code: I read it as last.next is being assigned to n.next; The visual is confusing how I am interpreting the code. Im sorry.

AishaStitt
Автор

why is the algoritm same for add node to end and add node to start

G-ep
Автор

in addToStart part n.next=n should be last.next=n am i wrong about that ?

volkanulker
Автор

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

BlueTreeCode
Автор

please just 1 qustion:
AddToEnd(20);
AddToEnd(10);
AddToEnd(12);
12-> 20-> 10-> 12-> 20-> 10-> 12-> 20-> 10-> 12-> etc..
should the list start with 20 why there's 12 at the first

themonster