DEV Community

Discussion on: JavaScript Data Structures: Doubly Linked List: Intro and Setup

Collapse
 
jamiescript profile image
Jamiebones

When you want to insert n delete from the beginning of a large array; it will be better to make use of a linked list instead because insertion n deletion from the beginning happen in constant time O(1) as compare to arrays which is O(n)