3 ms·
Congrats! Elo rating is a good idea for sorting.. I just implemented an insertion sort to help rank names which works but also feels a bit awkward.
by hamaluik 5y ago
Congrats! Elo rating is a good idea for sorting.. I just implemented an insertion sort to help rank names which works but also feels a bit awkward.
- remram 5y agoYour sort has a way higher complexity than required, in terms of comparisons. It will present the user with way more pairs than the optimal system would, which will make it very hard to sort through a longer list. You might want to use a merge insertion sort instead. See https://stackoverflow.com/a/53979250/711380 https://stackoverflow.com/a/53979250/711380 Of course this only works if you assume the order is total, which is actually a good assumption unless multiple people are contributing to the same ranking (in that case use ELO).
- hamaluik 5y agoHmm, that is a good idea; thanks. I don't have a CS degree so this is one of those areas where I don't know what I don't know.
- remram 5y agoOn an intuitive level, if I just said I prefer "Alice" to "Anna", and "Anna" to "Mary", it should not ask whether I prefer "Alice" to "Mary". In practice that seems a little bit difficult and I was hoping someone would jump with the optimal solution.