Hacker News new | ask | show | jobs
by enedil 2839 days ago
So in this case you're sure that this is the right abstraction. Here's one that I find equally well fitted: you basically want a stable sort on the list with key function f(x) = 1 - (x % 2) This is also a standard problem. Do you think this abstraction is worse? If so, why and how?