Hacker News new | ask | show | jobs
by xarope 652 days ago
n=3 is the exception, but if the library is otherwise divisible by three, you can't sort it in it's entirety.

as example: the library has 6 cards; the spell allows you to choose the top 3 cards and put them into the bottom in any order. So the spell only allows you to sort either the first set of 3 or the second set of 3 top cards, and there is no way to intermix the cards from the two sets of three => no way to sort the entire library.

Hope this make senses as to why N=3 is an exception as well!