Insertion: stick it on the end O(1) Retrieval: BOGO sort your list and return the first item. It’s O(1) in the best case.
Checkmate, nerds!
Submitted 5 days ago by fantawurstwasser@feddit.org to technology@lemmy.world
https://www.wired.com/story/new-book-sorting-algorithm-almost-reaches-perfection/
Insertion: stick it on the end O(1) Retrieval: BOGO sort your list and return the first item. It’s O(1) in the best case.
Checkmate, nerds!
vk6flab@lemmy.radio 5 days ago
The radio station I worked in put the next item at the end of the shelf with a label containing the next sequential number and added the metadata to the music library database.
In essence the sort order was age.
Yes, this predates the prevalence of digital audio from an era of vinyl, CD and DAT.
That said, cool article, but it bears keeping in mind that one solution does not fit all cases.