DEV Community

Discussion on: thank u, next: an introduction to linked lists

Collapse
 
glebirovich profile image
Gleb Irovich

Ali, thanks for the article. I found it very helpful and well explained. How would you approach sorting of the linked lists?

Collapse
 
aspittel profile image
Ali Spittel

Awesome! You could use any normal sorting algorithm that you would use for an array -- I think merge sort is usually preferred for them though. The implementation is uglier than for an array though!