Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
When is it a good idea to use linked lists?
In my pet project, I want to have a list of items with an index. The index of an item should be updateable, and the index of the other items should adjust.
A linked list would make it very easy to adjust the order since you just need to update the "next" node of 2 items, but I think this would make getting the index of items more troublesome.
What is the preferred way to do something like this, am I just overthinking it, and would updating all the indices of the items not be such a big job?
The project uses React and mongo (express-mongoose) btw, if that's important.
question