skeletonize: sorted element values such that zeros come first, ones second.