Stable separation for two classes of elements in an array

It is possible to do it in O(n) time and O(1) space apparently. The paper Stable minimum space partitioning in linear time by Jyrki Katajainen, and Tomi Pasanen claims to be able to do it.

Google for stable 0-1 sort.

Leave a Comment