Array vs Linked List - Pros & Cons | Which data structure is better & when ? | DSA

preview_player
Показать описание
In this tutorial we will take a detailed comparison between array and linked list and try to find out which data structure is better than the other in which scenarios. No one data structure can be considered as absolute best in every scenario as every DS has its own pros and cons. The motto of this video tutorial is to compare these pros and cons of each data structure in detail. The comparison will be made on the following criteria -
1) Flexibility of Size of Data Structure
2) Data Access/Read/Update (Cost)
3) Insertion & Deletion of Elements (Cost)
4) Memory Requirement & Memory Usage/Efficiency
5) Easy of use
6) Searching Methods

What is an Array ?
An array is a collection of elements of the same type, placed in
contiguous memory locations than can be individually referenced
by using an index to a unique identifier
What is a linked list ?
A linked list is a collection of elements(nodes) that are NOT stored in contiguous memory locations. The nodes are linked to each other using pointers(entity that points ot the next node). A node usually consist of 2 fields namely - data & next. Sometimes a 3rd field called id/name is also used.
Theory & Code article -
---------------------------------------------------------------------------------------------
Support Simple Snippets by Donations -
---------------------------------------------------------------------------------------------
Simple Snippets Official Website -
Simple Snippets on Facebook -
Simple Snippets on Instagram -
Simple Snippets on Twitter -
Simple Snippets Google Plus Page -
Simple Snippets email ID -

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

perfect great works
passed my exam because of your effort

cyberlancer
Автор

Could you please upload a video of C++ code implementation of Array Vs linked list?

Shaikhrayan
Автор

I would like to ask if I build a linked list with a rear node to keep track of the linked list so its deletion or insertion at the end can be O(1) right?

nguyenquangthai
Автор

WELL EXPLAINED AND STRAIGHT FORWARD COURSE IN DS C++..EASILY EXPLAINED

ruchitraushan
Автор

Bhai aapne DSA ki series kyo close kar di yaar please start karo bahut fayda ho raha hai bhai

kherakshay
Автор

i am very happy after join your data structure classes...♥️

shivamyou
Автор

Hi, can you please answer which is better in storing chunks of data(suppose an app receiving data in patches) so in that case ArrayList is to choose or LinkedList and why?

shuchivarshney
Автор

Hey brother can u please give us c++ STL course or can u suggest any good course on YouTube Please help I m in a big trouble and demotivation tooo.😫😫😫😫😫😫

shubhamdevrani
Автор

Hey Tanmay, i request you to please add Binary Search Tree and please make some videos on it, i honestly want to tell you that there are no better videos than your's !! it would help a lot like it helped till now :)

shivanidixit
Автор

Tanmay sir please upload non linear data Structures videos

praveens
Автор

Hi bro...can you please make a video on Vectors, lists, positions and iterators. It would be of great help. Btw thanks a lot for your outstanding videos. They have really helped a lot.

praveenkumarmukala
Автор

sir can you give us some example basis on your lecture ...
i meant to say..
sir hme apke videos ke according tpoic wise examples chaiye jisase ham practice kar ske....is trh to sirf ham padh skte hai n agar hme aur accha karna hh to example v jaruri hai na on the basis of all your videos like stacks, queueas, , , linked list....please sir

shivamyou
Автор

Hey Tanmay, you have helped through a really hard times, , , thank u very much
Just wanna make a little request if u kindly make video on topic hash table, trees and graph.
Badly in need of your lecture

alifkhandakar
Автор

Sir, can u start machine learning or data science courses ??? I am eagerly waiting for it ❤️🧡

comedyzone
Автор

you aren't actually freeing up any memory by de-linking a node

aamodvardhanpandey
Автор

After this how many topics are there bhaiya?

shreyanarang