#5 Linked List Implementation in Java Part 1 | Data Structures

  Рет қаралды 807,797

Telusko

Telusko

Күн бұрын

Пікірлер: 573
@satoshinakamoto171
@satoshinakamoto171 6 жыл бұрын
this is probably the best way someone on the internet has explained the topic.first give foundational concepts of the topic,second drawing it out and then showing the code implementations. i will recommend this playlist to the class i teach. thanks alot .
@jiageng1997
@jiageng1997 6 жыл бұрын
lol are you the guy who invented blockchain?
@mayurmahajan22
@mayurmahajan22 6 жыл бұрын
Is here anyone to explain me. i am a beginner in java. Can i complete data structure of java i mean this course before core java??
@vivekdubey2270
@vivekdubey2270 6 жыл бұрын
@@mayurmahajan22 Until you don't know how objects are getting created, how they have referred the basic syntax and all the basic stuff, that would be hard to learn, or you can work harder and can learn both of them together.
@right4you915
@right4you915 6 жыл бұрын
@@vivekdubey2270 Hello can you help me I have question that what is Node next ;
@vivekdubey2270
@vivekdubey2270 6 жыл бұрын
@@right4you915 node next is the address which is pointing to the next node... Say you are a linked list you have tow hands, left hand you hare holding a cake, in second hand you are holding a piece of ppr which have the name of your frnd who is holding candles, then your frnd who is holding candles, is holding candles for sure and another piece of ppr which have the name of the frnd who's birthday this is... So you are the head node, your right hand is node next, your scnd frnd is node, who's right hand is node next. 😌😌😌 Hope this explain the working of linked list.
@mysteriousloop1377
@mysteriousloop1377 3 жыл бұрын
My interviewer asked to implement Link List. I watched this video before one day of interview date at night. I implemented successfully in first attempt. Now he asked me to sort it. I tried but failed. But he didn't rejected me. Keep in mind learn Link List sorting also. Thank You Telusko
@mathewa3531
@mathewa3531 3 жыл бұрын
Where did you interview ?
@mysteriousloop1377
@mysteriousloop1377 3 жыл бұрын
@@mathewa3531 Infosys power programmer
@milkybrain7809
@milkybrain7809 3 жыл бұрын
@@mysteriousloop1377 I'm curious, did you try to sort it? or did you just say that you couldn't without trying?
@dilrajsingh5987
@dilrajsingh5987 4 жыл бұрын
this is for all the college professors out there, this is how you teach, this 20 mins video was more helpful than two 1:30 hr classes. This is the best way I have seen someone explaining linked lists to me
@gabrieldenobrega
@gabrieldenobrega 2 жыл бұрын
I had a four hour class about it. I learned much more from this video.
@gabrieldenobrega
@gabrieldenobrega 2 жыл бұрын
@Shay Treadwell Yes, I did. It was mostly a lot of different examples.
@alfianabdulhalin1873
@alfianabdulhalin1873 2 жыл бұрын
I'm kind of a Professor :P But I totally agree with you on this. This way of explaining... with code + examples... is a whole lot better and supposedly students could understand this faster.... BUT! It must also be coupled with the student wanting to learn this stuff :) Anyhow... this is a good tutorial for LL :) Good job!
@LazizbekYusupov92
@LazizbekYusupov92 3 жыл бұрын
Guys, I have made 4 general attempts to watch and understand this stuff. I didn't count endless flashbacks within the video itself for 10-20 seconds. The author is right - you might make several attempts, to get it all right. Gratitude to the author for such a great work!
@sunnatjonsavrulloev2691
@sunnatjonsavrulloev2691 5 жыл бұрын
Thats perfect, thank you indian guys, you always try to make everytjing clear in your tutorials
@Doweltcross
@Doweltcross 4 жыл бұрын
Sunnatjon Savrulloev 😂😂😂😂😂😂
@AshwiniBhaskarPurple
@AshwiniBhaskarPurple 5 жыл бұрын
To display the values, you can use while(node!=null){ System.out.println(node.data); node = node.next; } that way you don't need to use the second print statement. Awesome videos, really helpful.
@mouliballanki5818
@mouliballanki5818 5 жыл бұрын
lol i know it
@amjadotibi569
@amjadotibi569 5 жыл бұрын
can I ask you how ? how it is will know to compare the address with out I say "next"
@giveaway4002
@giveaway4002 5 жыл бұрын
Well I was about to write this amazing comment, actually this is put account that he was teaching and as well as programming, so he had to change the whole concept, that would lead chaos in learners mind, that is why after figuring whole error out, he chose easy way to solve it. On the other hand the person who made the comment follow a great convention in coding that is to avoid as much as possible to simply not write same code statement again and again. Thanks for reading.
@dinkarinjosh
@dinkarinjosh 5 жыл бұрын
@@giveaway4002 Well, he sort of the used the same logic when he wrote, if(head == null).
@vardaanpruthi9890
@vardaanpruthi9890 4 жыл бұрын
or a do-while loop maybe ?
@coderbuddy3875
@coderbuddy3875 4 жыл бұрын
Great explanation !!! I really wanna say I was not getting how to approach linkedlist but after watching telusko videos i got it .... I also watched apni kaksha and some other channels but they are not explanaing well and here all my concept become clear. Thank you sir ,!!!
@swathikak9433
@swathikak9433 4 жыл бұрын
Only after watching ur video I got clear idea in list thnks a lot sir.. 👍
@ElevateWithMiranda
@ElevateWithMiranda 5 жыл бұрын
wow! you made it so easy to understand. I've been trying to understand linkedlist creation for about a week now no avail, but just your one video make me grasp it all. thanks a lot
@avinashmk1465
@avinashmk1465 2 жыл бұрын
The best explanation ever for LinkedList..... I have seen so many videos of others but couldn’t understand anything...Thank you 🙏🏻
@purodhachanuthika5898
@purodhachanuthika5898 3 жыл бұрын
I could not understand anything wat i have learnt back in my university for whole semester but this video is doing great, i just understood the whole damn concept within 20 minutes ...... thank you
@ArjunSingh-qt5jn
@ArjunSingh-qt5jn 2 жыл бұрын
after watching it many times, finally I got to understood Linked List, thank you :D
@akshaypandey4904
@akshaypandey4904 7 жыл бұрын
Sir ,for traverse the node u can check condition as while(node!=null) for reducing the last line SOP(node.data).
@prempresents8776
@prempresents8776 Жыл бұрын
Crct
@publicvoiceraja2974
@publicvoiceraja2974 7 ай бұрын
Hello Sir Navin Reddy garu, All of Your videos are awesome Sir, I'm thankful to you, we all are, actually. And one thing is, while printing the elements, in while loop, instead of checking the condition while(node.next != null), it would be more meaningful to check the condition while(node !=null) so that, we can print the elements irrespective of the last node which is obviously null. instead of while(currentNode.next != null) { System.out.print(currentNode.data + " "); currentNode= currentNode.next; } below looks more good: while(currentNode!= null) { System.out.print(currentNode.data + " "); currentNode= currentNode.next; } . Love You Sir...
@dokodiaries
@dokodiaries 4 жыл бұрын
really awesome video Dissatisfaction = null
@jaredcrebo5426
@jaredcrebo5426 6 жыл бұрын
This is the best explanation I have gotten for linked lists. I can finally finish my project! Thank you so much.
@coolpopk
@coolpopk 4 жыл бұрын
I believe that this is the best way to explain to a beginner about how to implement a linked list, it’s articulated well. Thank you sir!
@sash2686
@sash2686 4 жыл бұрын
This is the best tutorial for this topic. Thank you so much for helping me and I have watched countless tutorials on it but I just can't seem to grasp the concept clearly, but u helped me. Thank you so much for the explanation!! Have a great day!
@Superman20000
@Superman20000 3 жыл бұрын
This teacher is very clear, I like his style and I can understand what he says, his accent is very pleasant and he has a good mic!..
@dannywithnuggets
@dannywithnuggets 3 жыл бұрын
Absolutely amazing. The best explanation of a linked list I have ever seen hands down. The use of the whiteboard whilst running the debugger is genius!
@dragnar4743
@dragnar4743 Жыл бұрын
👍👍👍 not only explained the code properly step-by-step, but also explained it using debugger along with diagram. 💛💛
@deli5777
@deli5777 3 жыл бұрын
Yes, very helpful. I couldn't have gotten through my assignments otherwise. thanks
@happynewyear6123
@happynewyear6123 4 жыл бұрын
even after watching many videos i couldn't quite understand the concept. but your video was great. i can write up code without having to look at google again. Thanks a lot :)
@salomonmetre2117
@salomonmetre2117 4 жыл бұрын
Very nice video. You explained it so well that I was able to print all the values of my linked list before you notice the small mistake you made in the code. Happy to discover Telusko.
@ashishburnwal1578
@ashishburnwal1578 3 жыл бұрын
you can use while(node!=null) in show function to print all the values( including the last node) as node is referencing the node itself , just checked by printing the value of node.
@Gyooopp
@Gyooopp Жыл бұрын
Hampe to he hi 9
@kanchapagimhara3163
@kanchapagimhara3163 4 жыл бұрын
I watch this video morethan 3 times .finally I got it.Thank you very much
@CarlSaptarshi
@CarlSaptarshi 4 жыл бұрын
Thank you so much for this - I have been following other tutorials online to learn more about data structures and algorithms, however this is the first one that really explained what was going on. Great work!
@somxai4570
@somxai4570 3 жыл бұрын
thanks this video made my 2 week for learning how to implement the LinkedList in to just 1 hour
@rohannegi788
@rohannegi788 3 жыл бұрын
this is probably the best way someone on the internet has explained gr8 job sir
@skirfan9908
@skirfan9908 4 жыл бұрын
Whole heartedly thank you 🎉.The final part debugging is the part where we fetch everything...
@sheerazahmed9980
@sheerazahmed9980 4 жыл бұрын
Its a relief that object oriented was invented, carrying reference to the pointers was always a difficult part in the school. Thanks for the brilliant explanation Sir.
@martinlutherbironga5695
@martinlutherbironga5695 3 жыл бұрын
Telusko I love your videos, you are talented in teaching, this is really a great blessing. You are great man
@ankeshraj6375
@ankeshraj6375 3 жыл бұрын
I was searching this information in java but I didn't find it anywhere.. This is exactly what I was looking for !!
@xsh8432
@xsh8432 3 жыл бұрын
18:00 - insted of printing last node manually we can replace while loop condition with (node != null),. It will print last node automatically.
@Cringy69
@Cringy69 3 жыл бұрын
oo wow....thanks bro....😊😊😊
@fahmifarhat7900
@fahmifarhat7900 3 жыл бұрын
Thank you so much ! This is the best turorial to see how LinkedList has been implemented in Java.
@mainaksen2447
@mainaksen2447 3 жыл бұрын
Instead of using while loop in show() within LinkedList class, we can use do-while loop. Then, we don't have to print the last node's data manually outside the loop. Thank you!
@shivarajbiradar756
@shivarajbiradar756 2 жыл бұрын
Hi Mainak, If LinkedList is empty then we will get NullPoniterException if do while loop is used
@aronmosser5398
@aronmosser5398 Жыл бұрын
you are the best man, you have explained it much better than my teacher thank you
@amrbrj3284
@amrbrj3284 Жыл бұрын
The only one who taught me the data structure entirely and easily. Thanks a lot ♥♥
@kanchapaudukumbura7991
@kanchapaudukumbura7991 4 жыл бұрын
Good explanation.I watched this 4 times,finally I understood 100%
@altechy7304
@altechy7304 3 жыл бұрын
Very helpful after 4 yrs... Thank you
@ManojKumar-rs2ps
@ManojKumar-rs2ps 5 жыл бұрын
I had been trying to find a good explanation of the implementation of a linked list for 3 hours. But At last, I found this video. Why didn't I see this video first? I can't tell how helpful is this video for me.
@kalaivanib9555
@kalaivanib9555 Жыл бұрын
Thank you very much for this thorough walk-through. I understood the concept of Linked list but was stuck at implementing it and your video helped understand it very clearly. hands-on approach is always the best way to retain a concept. Although I was searching for implementation of LL in Javascript, I was able to write it on my own since I saw how it is done in Java.
@SanthoshaK-w5b
@SanthoshaK-w5b 6 ай бұрын
hey finally i understood. i watched 4 times to understand the code. as he told consumes takes time to understand Thank you so much telusko
@arijitmalakar6911
@arijitmalakar6911 3 жыл бұрын
I think I have to watch it atleast 3times to totally understand the implementation part....but tbh this video is awesome!
@Olympusmons9
@Olympusmons9 4 жыл бұрын
for every IT pblm there is a solution reference called telusko thanks buddy....
@suparnadas3346
@suparnadas3346 2 жыл бұрын
Now I understand what a linked list is...thank you so much
@tannerbarcelos6880
@tannerbarcelos6880 4 жыл бұрын
Coming from c++ and realizing everything in java is an object, or a class with a bunch of methods is weird, but, not having to remember -> and * and & for memory is beautiful lol. Java really makes OOP much more understandable
@mhamadjawadalhajjar5824
@mhamadjawadalhajjar5824 3 жыл бұрын
java is way easier for me also coming from C++, java has an easier syntax it just makes life easier!! :p xd
@rizwan5740
@rizwan5740 6 жыл бұрын
This is quite possibly the best elaboration to the linked list data structure I have even seen. Thank you Telusko.
@ciaranorourke2021
@ciaranorourke2021 2 жыл бұрын
Certainly did understand more about linked lists after watching, thanks :)
@sumrjd
@sumrjd 6 жыл бұрын
from Saudi , awesome explanation he got me to the root and basic where these next , and head are doing , on simple word their job are to locate the tail of node they are chasing the null so they can tell us if we have one node or more !
@saadmanahmed860
@saadmanahmed860 6 жыл бұрын
iconoclastic lecture..sir..aapka tutorial se hi meri college study kat rahi hain.. thank u sir
@manzero134gd
@manzero134gd 5 жыл бұрын
India numba wan Thank you guys for all these tutorials. From Mathematics to Programming, ya'll are there to save the day.
@shadabmalikshah7545
@shadabmalikshah7545 3 жыл бұрын
Dear Naveen , why did you stop this amazing, wonderful series if possible please give us full dsa course in one video like core java,spring,spring boot,rest,hibernate..... And much more......I am grateful for all that yoy provide....stay safe stay blessed, stay being alien
@andretheruler714
@andretheruler714 4 жыл бұрын
you were right i had to watch it multiple times to understand it, but thank you for uploading this video
@punitdwivedi7232
@punitdwivedi7232 6 жыл бұрын
Amazing explanation sir i have watched many videos about how to implement linkedList in java but here i understood.
@kobracommander2128
@kobracommander2128 6 жыл бұрын
I like how you explain the classes to be used. Great Work!
@ezelpayrktar7381
@ezelpayrktar7381 5 жыл бұрын
wallah you are the bast one disc. the singly linked list i have ever seen in the youtube, even my doctor in the university, thank you brother
@AMPTechGrade
@AMPTechGrade 6 жыл бұрын
of all the videos, I think this one helped me understand linkedlist the best. Thank you so much my friend.
@yontenloday6128
@yontenloday6128 4 жыл бұрын
Thank You so much Navin sir!! It was uploaded way long back but your tutorials are inseparable!!
@sourabhsharma2746
@sourabhsharma2746 3 жыл бұрын
Wonderful Explanation. Thanks man. In my opinion Instead of printing it at the end manually, we can do while(node!=null){ sop(node.data); node = node.next}.
@borisborovsvski5374
@borisborovsvski5374 5 жыл бұрын
Give your attention here i have been asked to implement a List on a interview and you have only paper its a important topic in my opinion. Great explanation btw try to implement insertAt() by yourself before you see it. Also they ask if you can make it for all types of data without using generics you simply put the field in Node class from (int value, double value) etc to Object value; and you can take all kind of data then.
@puttarajkoliwad
@puttarajkoliwad 5 жыл бұрын
we can also reduce time complexity of insert() by using "tail" reference node
@NirajKumar_2651
@NirajKumar_2651 2 жыл бұрын
The way you explain things is simply Awesome!
@viveksinghchauhan4083
@viveksinghchauhan4083 4 жыл бұрын
While adding element at the end we have traverse the whole list..and the time complexity is O(n) ..instead we can add elements at the starting then we will have constant time complexity.
@sourabhrai3509
@sourabhrai3509 3 жыл бұрын
Awesome bro...understood linked list ...was trying to understand it for 4 days
@khushibhola3533
@khushibhola3533 2 жыл бұрын
You can make show function like this: here you don't have to write System.out.println(x.data); in the end. Hope this helps! public void show() { Node x=head; while(x!=null) { System.out.println(x.data); x=x.next; } }
@ahsansiraj7505
@ahsansiraj7505 4 ай бұрын
best lecture to learn linked list implmentatio of java .alien never fails
@liltrix3006
@liltrix3006 4 жыл бұрын
Way better than my professor. Thank you so much for this
@nord_9586
@nord_9586 5 жыл бұрын
Thank you! Excellent work! Really the best way of explaining this on the internet. It helps a lot for me! Keep it up!
@carindia777
@carindia777 3 жыл бұрын
It doesn't get bored if I Watch this video again n again
@Yuneth-p3i
@Yuneth-p3i Ай бұрын
Thanks alot! Cuz of you now i understanc linked implementation! Having examxs in 2 days!😌
@venusriannapureddy4503
@venusriannapureddy4503 2 жыл бұрын
Thank you so much for this explanation. I never experienced this type of clear explanation. 👋👋👋
@meryemabbassi5123
@meryemabbassi5123 3 жыл бұрын
by far the best explanation on the internet
@mrinmayrajbongshi7824
@mrinmayrajbongshi7824 3 жыл бұрын
That might be best way someone explain the concept .thank you
@koffee8653
@koffee8653 6 жыл бұрын
Thank you so much, i was tring to code ir but wastnt able to i have seen allmost al videos on liked lis as fa this is the best way to code linked list have have found thank you again.
@mformobileapps
@mformobileapps 4 жыл бұрын
navin sir you are just awesome...Thanks a lot sir for the ossssmm tutorial series.
@MinaAkbari-kq9rz
@MinaAkbari-kq9rz Жыл бұрын
The best video on Linked Lists... Thank you so much...
@lammartial
@lammartial 3 жыл бұрын
now i understand how oop concept works in building a data structure thanks to u. Keep up the good work!
@HugoAyala1983
@HugoAyala1983 4 жыл бұрын
Very clear and concise explanation, just what I was looking for...subscribed!!!
@hamidali467
@hamidali467 3 жыл бұрын
Thank you so much I have understand this topic clearly your method is so good
@digvijayyamagekar4300
@digvijayyamagekar4300 3 жыл бұрын
thank you very much for such a detailed explanation of node
@selvasella70
@selvasella70 3 жыл бұрын
Thank you so much bro... I saw lots of videos but ur the best...
@elimyu
@elimyu 4 жыл бұрын
Thanks for the extremely detailed explanation! This video was very helpful to see how linked lists are traversed :)
@dipakraut6058
@dipakraut6058 4 жыл бұрын
Sir, please make videos on more data structures like Tree, DP, Greedy, Graph, and furthermore.
@truongdo510
@truongdo510 Жыл бұрын
incredibly explicit explanation sir. thank you!
@BappuDebNath
@BappuDebNath 4 жыл бұрын
You made understanding very EASY. Thank you very much. KINDLY think of changing the mouse pointer though. It was difficult to notice when you hovered over Ms. Paint.
@anchitbhushan6172
@anchitbhushan6172 5 жыл бұрын
i tried using the insertAt() using while loop and it also worked fine
@abebe7017
@abebe7017 6 жыл бұрын
concise yet informative.Keep going man! Thank you very much.
@narendramannan8319
@narendramannan8319 3 жыл бұрын
In the show() method, to print the last element, you can change the condition in the while loop to "while(node != null)"
@fatih12butun84
@fatih12butun84 5 жыл бұрын
sir, you are amazing. i try yo understand this topic for about 3 weeks. now i understood thank you so much
@bilalshah6561
@bilalshah6561 4 жыл бұрын
It was a amazing experience to learn it... Thank u sir♥️
@shrutikumari6727
@shrutikumari6727 3 жыл бұрын
simple explanation but best!!!
@fanindhrathirunagaru2667
@fanindhrathirunagaru2667 5 жыл бұрын
I understood the concept very well. Thank you sir for explaining in such a nice way.
@alanchang3577
@alanchang3577 2 жыл бұрын
Keep doing what you're doing... love your video! Thank you so much! You have no idea how much this helps me.
@PoojaVerma-fb6of
@PoojaVerma-fb6of 7 жыл бұрын
while(n!=null) { n=n.next; } Is enough to traverse the linked list. No need to manually print the last node data.
@right4you915
@right4you915 6 жыл бұрын
Hello can you help me I have question that what is Node next ;
@marconarca2706
@marconarca2706 5 жыл бұрын
@@right4you915 it is what traverse the list
@random-0
@random-0 5 жыл бұрын
bro why not use do while loop for show method
@yatinpandey6499
@yatinpandey6499 4 жыл бұрын
Watch the video at least three times if you are not getting it Remember to pause after every node explanation and you will get your doubt clear at that particular moment. Thankyou sir Love and Respect 🔱💕🙏🏻
@kubawozny134
@kubawozny134 3 жыл бұрын
Great video, nice explanation. In the method show I think better condition would be node != null as it then prints out last one too :)
@JacksonTowers3
@JacksonTowers3 3 жыл бұрын
bro ive been sweating so long trying to figure out my hw, that you so much fo your help
@vishaljain9634
@vishaljain9634 3 жыл бұрын
am in love with your explanation ,provide more video on data structure please
@RajuPalanki
@RajuPalanki 3 ай бұрын
Thanks for the lecture. I understood the logic.
@Lionelmessi-zp9vt
@Lionelmessi-zp9vt 3 жыл бұрын
crystal clear explanation,kudos sir
AI in Excel: Must-Have Features for Every Excel User 🚀
29:51
Saddam Tech
Рет қаралды 4,2 М.
Long Nails 💅🏻 #shorts
00:50
Mr DegrEE
Рет қаралды 15 МЛН
كم بصير عمركم عام ٢٠٢٥😍 #shorts #hasanandnour
00:27
hasan and nour shorts
Рет қаралды 10 МЛН
Симбу закрыли дома?! 🔒 #симба #симбочка #арти
00:41
Симбочка Пимпочка
Рет қаралды 4,7 МЛН
#4 Introduction to Linked List | Data Structures
11:02
Telusko
Рет қаралды 240 М.
Learn Java in 15 Minutes (seriously)
19:50
ForrestKnight
Рет қаралды 124 М.
Tree Implementation in Java | DSA
17:03
Telusko
Рет қаралды 53 М.
New divisibility rule! (30,000 of them)
26:51
Stand-up Maths
Рет қаралды 307 М.
LinkedList vs ArrayList in Java Tutorial - Which Should You Use?
11:43
Coding with John
Рет қаралды 607 М.
Java For Programmers in 2 hours
2:02:36
Telusko
Рет қаралды 31 М.
2.4 Linked List Implementation in C/C++ | Creation and Display | DSA Tutorials
29:01
Jenny's Lectures CS IT
Рет қаралды 1,8 МЛН
Learn Linked Lists in 13 minutes 🔗
13:24
Bro Code
Рет қаралды 347 М.
Long Nails 💅🏻 #shorts
00:50
Mr DegrEE
Рет қаралды 15 МЛН