For a personal project I'm working on, I need to sort a list by asking user preferences. Naturally the list can't be too long, at most 20 values. Now since complexity is not an issue, I'm focussing on reducing the number of questions asked. My initial idea was to use library sort and overload the custom comparator which then takes user input. But it seems to me that it's asking too many questions. I've also used a memoizing table, which returns answer for (x,y) if (x,y) or (y,x) has been answered by user before, but it's still unsatisfactory.
Help me design a sort which asks for minimum comparisons. Complexity of computation is not much of an issue, go wild.