DEV Community

Discussion on: JavaScript Data Structures: Singly Linked List: Setup

Collapse
 
miku86 profile image
miku86 • Edited

Great questions, Amir.

Use cases with benefits are:

  • when you often have to add or remove data: SLL: O(1) vs. Array: best case O(1) (at the end) - worst case O(N) (at the start)

But in the end, you're very unlikely to see a Singly Linked List.

Collapse
 
cooky9 profile image
Landon

Thanks buddy

Thread Thread
 
miku86 profile image
miku86

You're welcome.