We examine sorting on the assumption we do not know in advance which way to sort. We use simple local comparison and swap operators and demonstrate that their repeated application ends up in sorted sequences. These are the basic elements of Emerge-Sort, an approach to self-organizing sorting, which we experimentally validate and observe a run-time behavior of 0(n~2).
展开▼