+ 2

JAVA Can anyone teach me datastructure Linked list in java?

Please dont just simply show me the link of data structure linked list provide in sololearn,because i doesn't understand from there so im asking here.need a detail explanation.....

1st Sep 2019, 7:37 AM
Tzion
Tzion - avatar
4 Respostas
+ 3
not an video, but a code with alot of comments, hope this still might help ... 😅 https://code.sololearn.com/cLIhZ0y0Kklv/?ref=app
1st Sep 2019, 9:04 AM
Anton Böhler
Anton Böhler - avatar
+ 4
In a Linked List you have depending ob implementation 2 classes: -LinkedList -LinkedListNode the LinkedList is used to make changes and access the list. the LinedListNodes are the actual structure. Inside the LinkedList we have a LinkedList-start which in the beginning holds null, because the list is empty. when we add an element (to the end) we test if the start is null, if it is we set it to a new LinkedListNode containing the element to be added, if it isn't null, we call it's function to add. The LinkedListNode has 2 attributes, content and next, they are self explainatory. Now when the method add of an LinkedListNode is called it tests if next is null, if it's not we call the function add of next if it is we set it to a new LinedListNode containing zhe content. There are many diffrent implementations, like adding 2 more classes for faster and easier recursion calls... hope this helps! happy coding! 😄
1st Sep 2019, 7:49 AM
Anton Böhler
Anton Böhler - avatar
+ 1
Anton Böhler Thanks you for your clear explanation , and yea i saw too much of code of linkedlist and differently implementations of those make me confused.that would be awesome if got a video plus step by step ,well btw thanks a lot
1st Sep 2019, 8:30 AM
Tzion
Tzion - avatar
0
~ swim ~ i need something video or any to explain it,cuz in sololearn, the course just provide a list of code and i need a explaination step by step of those code.i also tried youtube and followed their constructions in intellj idea but some of theirs way are old.... the video around few years ago i mean
1st Sep 2019, 8:21 AM
Tzion
Tzion - avatar