Search This Blog

2023/04/18

Linked List Vs Array in Javascript

1)Arrays are a built-in data structure in JavaScript.
2) linked lists do not provide constant-time access to elements by
index and require iterating through the list to find an element.
3)Linked list has Extra memory usage to store references to next nodes in the list.
4)For Large Array Insertion and deletion at arbitrary positions
can be slow,also Dynamic resizing can be expensive.
5)Linked lists are a good choice when constant-time insertion and deletion
at arbitrary positions in the list is required and when the size of the data is

dynamic and can change frequently. 

No comments:

Post a Comment