Learn Linked Lists in 13 minutes 🔗

preview_player
Показать описание
LinkedList data structures and algorithms tutorial example explained

#linkedlist #linkedlists #tutorial

// *******************************************************
// LinkedList = Nodes are in 2 parts (data + address)
// Nodes are in non-consecutive memory locations
// Elements are linked using pointers

// advantages?
// 1. Dynamic Data Structure (allocates needed memory while running)
// 2. Insertion and Deletion of Nodes is easy. O(1)
// 3. No/Low memory waste

// disadvantages?
// 1. Greater memory usage (additional pointer)
// 2. No random access of elements (no index [i])
// 3. Accessing/searching elements is more time consuming. O(n)

// uses?
// 1. implement Stacks/Queues
// 2. GPS navigation
// 3. music playlist
// *******************************************************
Рекомендации по теме
Комментарии
Автор

TL;DR
small data set: LinkedList = BAD
large data set + lots of searching: LinkedList = BAD
large data set + lots of inserting/deleting: LinkedList = GOOD


import java.util.LinkedList;


public class Main{

public static void main(String[] args) {
//

// LinkedList = Nodes are in 2 parts (data + address)
// Nodes are in non-consecutive memory locations
// Elements are linked using pointers

// advantages?
// 1. Dynamic Data Structure (allocates needed memory while running)
// 2. Insertion and Deletion of Nodes is easy. O(1)
// 3. No/Low memory waste

// disadvantages?
// 1. Greater memory usage (additional pointer)
// 2. No random access of elements (no index [i])
// 3. Accessing/searching elements is more time consuming. O(n)

// uses?
// 1. implement Stacks/Queues
// 2. GPS navigation
// 3. music playlist
//

//

LinkedList<String> linkedList = new LinkedList<String>();
/*
// LinkedList as a Stack
linkedList.push("A");
linkedList.push("B");
linkedList.push("C");
linkedList.push("D");
linkedList.push("F");
linkedList.pop();
*/
// LinkedList as a Queue
linkedList.offer("A");
linkedList.offer("B");
linkedList.offer("C");
linkedList.offer("D");
linkedList.offer("F");
//linkedList.poll();

//linkedList.add(4, "E");
//linkedList.remove("E");






//linkedList.addLast("G");
//String first = linkedList.removeFirst();
//String last = linkedList.removeLast();



}
}

BroCodez
Автор

This channel doesn't have normal content.
rather masterpieces

geeknet
Автор

I just love the way you teach, straightforward, easy, and clear。 Lucky to have you in this world

leihan
Автор

Your videos teach me more than my professor.

jaimuelsilva
Автор

My bro who code;
You are the best man
I am a CS student in The Gambia 🇬🇲!
This channel is awesome

amadujalloh
Автор

What a godsend of a video. I'm crrently doing online CS 1103 course and literally the topic for this week is about linked lists. Thank you for this video. Your videos have truly helpful in my studies thus far.

marklaw
Автор

You are a god of programming, Thank you for making my life easier. you are way more better than my stupid college teachers.

adityajain
Автор

I absolutely love the way bro introduces himself. i love you bro

Wonder_Chariot
Автор

That was the most simple straightforward no bs explanation for a data structure ever. You make DS&A look approachable!! Thanks for the content 🙏

deafprophets
Автор

Awesome, simple explanation covering LinkedList thanks

DeveloperLewis
Автор

Fastest I have ever subscribed to a channel. I wasn't even half way through the video.
Well done bro. 😊

wecari
Автор

This is the only explanation I've been able to comprehend. Thank you

davidjunior
Автор

OMG you just helped me to understand in laymen's terms what my professor and multiple other youtubers couldn't

MrSlinky
Автор

Hlw Bro Code!
Keep updating this playlist at regular intervals.
The way you explain is Awesome..
😊😊😊😊😀😀😀

rahulmandal
Автор

OMG right on time!! Are you reading our minds?

theuberman
Автор

A docx/pdf file of this courses source codes and notes will be really helpful...thanks for keeping this course free really means a lot!!

shivamjha
Автор

Thank you so much for the detailed explanation, along with the 'uses' at the end.

agentpenguin
Автор

You saved me during my data structures class

danielm
Автор

I did a happy dance because of how simply you explained this, so even those curious can see if this is something they want to do as far as becoming a programmer. I'm expanding into more complex concepts in Python. this has helped me grasp a concept faster than cheetahs racing. You got yourself a new subscriber!! :D

void
Автор

Awesome teaching guide not only teach easily to understand but coding clearly. Thanks greatly!

longfeili