@prototype0277

I've been working with Java for nearly 15 years now. I remember studying linked list in and various other data structures in college. John, you explained something that college professors flunked folks over so much better and in a matter of minutes rather than days. Bravo sir.

@nootwin5602

Ngl I would die without this channel

@phinhhung2398

Conclusion, AL is better for storing, retrieving and displaying data, LL is better for manipulate (add, insert or remove).

@goerekt

I once had a job to improve performance of a java application. Best improvement was done by just exchange a LinkedList to an ArrayList, because it was used to read a lot by index. Very simple change, but massive impact.

@findlestick

Your channel is the only one that has increased my enthusiasm for Java, tenfold. Your videos really are a breath of fresh air here on YouTube. I’m going to watch all your vids and thumb-them-up in gratitude. 👍

@jam43040

I don't know how your videos can be so condensed but still thorough. Thanks from all of the Computer Science majors.

@Lyosha.

The arrayList does not leave a "space" for the new element in the new array. It instead duplicates all the values from the index into which you want to move the new element into . Those duplicates are positioned one index down from that point (you get one doubled item ) and then that doubled item is replaced with the new one you are moving so the process it's actually longer than what you explained :)

@dedz

If someone is wondering why arrays have a constant time to get an element, it's because to get an element from the array, it makes a calculation, a really simple calculation actually.. the programs already knows the position that the array is located in the memory, and already knows the type of data the array is holding, so it can calculate the location of any index with a constant number of steps by doing : memoryPosition + (index * typeSize). 

So, knowing the “start” position of the array, you just need to multiply the index by the amount of memory that this specific type takes. Let’s say you have an array that holds 100 int numbers, and let’s say the array is located at the space 1000 of the memory..  and int numbers take 4 bytes of memory each. So, to get the 50th element, we just need to multiply the index by the size of bytes (49 * 4) and we will get 196 bytes, now, just add the 1000 (the position that the array starts in the memory), you will get 1196 bytes, this is where the index number 49 is located. That's why it's constant, because you can have a 3 size array or a 100000 size array, the array will always do the same math calculation to get the index that you want to get.

@portalSpiderman

July 14, 2022 - Properly learned ArrayList and LinkedList. Thanks John!

@wickedsnuk3812

It was like those lectures where the instructor teaches so smoothly so s/he puts everything in your mind without you noticing.

@lootster

I have problems understanding LinkedList despite reading numerous articles online. Your video is a god's gift!

@SpooxyCowboy1911

It’s so refreshing to hear an explanation that doesn’t have a heavy accent. Almost all my professors are hard to understand and it makes it difficult to learn

@alexanderrizzi8003

This is by far the easiest video to help understand this concept. As a relatively new programmer, I always found it somewhat puzzling to have different implementations of the List interface, but this video clears so many things up and gives actual reasons for their existence! Cheers!

@ryuujisan32codes

As someone who hasn't touched java except when an interview required it - watching your videos made me feel like I can code anything in java now. You're an excellent teach, bro. You've got a gift for sure.

@lootster

00:00 Creating and comparing linked lists and array lists in Java
01:31 ArrayList and LinkedList are virtually identical
03:02 ArrayList vs LinkedList in Java
04:38 Linked lists are a chain of nodes with pointers to the next node.
06:09 ArrayList and LinkedList have different ways of storing data.
07:36 Linked lists are better than ArrayLists for adding or removing elements.
09:00 Linked lists are faster for adding and removing elements, while arrays are faster for getting elements at a certain position.
10:25 Choose ArrayList for retrieving specific values, LinkedList for adding/removing elements.

@slaki1706

Amazingly clear video, great job. Just a minor remark: To emphasize that the interface of the two lists is the same you could have used just List<String> as their type. Generally, that is the recommended way anyway.

@DassVeryGood

Crazy how someone can explain all this clearly and simply in 10 minutes. Where my uni would take 2 mins of explaining nothing with a minimalistic slide showing what a linked list looks like. Thank you so much

@amirulidzham

I learn java since 2014 but now I understand it. Huge thanks

@ginandi1

In most use cases, amortized analysis shows equivalence of run time.
Linked lists, however, lead to more cache misses (array can be bulk copied to cache with much fewer misses) which puts array in a huge advantage for practical reasons as well.

@patrickweiler3fc09

This video changed my view of the topic completely! You just managed to break it down easily, this is exactly what I need, thank you so much! This is my favourite channel for java coding