LinkedLists vs ArrayLists 🤼‍♂️

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

#linkedlists #arraylists #tutorial
Рекомендации по теме
Комментарии
Автор

import java.util.ArrayList;
import java.util.LinkedList;

public class Main{

public static void main(String[] args) {

LinkedList<Integer> linkedList = new LinkedList<Integer>();
ArrayList<Integer> arrayList = new ArrayList<Integer>();

long startTime;
long endTime;
long elapsedTime;

for(int i = 0; i < i++){
linkedList.add(i);
arrayList.add(i);
}

//
startTime = System.nanoTime();

linkedList.get(0);


//linkedList.remove(0);



endTime = System.nanoTime();

elapsedTime = endTime - startTime;

+ elapsedTime +" ns");

//

startTime = System.nanoTime();

arrayList.get(0);


//arrayList.remove(0);



endTime = System.nanoTime();

elapsedTime = endTime - startTime;

+ elapsedTime +" ns");

}
}

BroCodez
Автор

Thanks for the video. Now I clearly know the difference between the Linked and Array list.

anishkoppisetty
Автор

you are a great programmer also a great teacher..! thank you so much! Love all your videos... please keep going! Wish I could press more than only one like button👍

jammandu
Автор

Bro, we need a full course on C programming.

viveknag
Автор

I swear you sound like one of those guys doing Video game Walkthroughs.

dredevilhalo
Автор

new javas tutorials

pog!!! 🥰🥰🥰🥰🥰🥰🥰🥰🥰🥰🥰🥰🥰🥰🥰

Daaninator
Автор

Here's a comment to beat the algorithm

sanskarsongara
Автор

How in the world does this have only 3 views!? Stay strong Broski!

akash
Автор

I'm still a beginner. And i dont want to watch this video right now but i came here to increase the views even by one cuz i love this guy.

pansilukv
Автор

best instructor on the planet earth for DS, period.

anasrathore
Автор

Great.
If possible, please also solve some Leetcode problems based on each topic

prodiptamondal
Автор

GREAT video! Very clean and easy to understand

abdallahalmanasrah
Автор

3:55 hey bro i made the same program and i try to shift the order of linked list and array list (like array list first then put the linked list first in the code)
and i find something extremelly weird => which ever i put on the second consumes less time for getting element at index 0
idk but its weird

aka-Monster
Автор

You're best, even my English's bad

globalluanlo
Автор

Why didn’t you type List Integer arraylist?

steftrando
Автор

To summarize, when working with large data sets LinkedList struggles while performing any operations with middle elements and ArrayList struggles while inserting/removing elements closer to the start.

benderbg
Автор

Thank you for these amazing tutorials. Could you make a video or give some ideas on some intermediate projects that could be made after making a few GUI games?

Jellonova
Автор

So very clear explanation! Thans a bundle!

nicholaswhite
Автор

And Bro pls tell me what is this data structure and algorithm I wanna watch but don't know what is it...

satyamshankar
Автор

what is your favorite programming language, bro?

murilosilvestre