Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Is there any theory on analyzing sorting real world objects? Like playing cards.

In a computer, picking the n'th item in an array is O(1), in the physical world it's O(n). In a computer inserting an item is O(n), but in the physical world it's O(1).

Are there any good algorithms for sorting playing cards?



I think Insertion sort tends to be the most natural sort for doing things like sorting playing cards. Anything else seems like it would be more of a hassle than it would be worth in real life.




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: