filmov
tv
Array vs Linked List - Pros & Cons | Which data structure is better & when ? | DSA
![preview_player](https://i.ytimg.com/vi/mQJPJC0f5Ik/maxresdefault.jpg)
Показать описание
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 -
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 -
Комментарии