3 ms·
Your 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
by remram 5y ago
Your 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.