News

A pure implementation of Dutch national flag (DNF) sort algorithm in Python. Dutch National Flag algorithm is an algorithm originally designed by Edsger Dijkstra. It is the most optimal sort for 3 ...
As an FYI, nosferatu-man's and my solutions are better than S. Carton's, but require Python 2.4. The "key" parameter to sort/sorted does a "Decorate-Sort-Undecorate"[1] automatically, whereas the ...
Dutch National Flag algorithm is an algorithm originally designed by Edsger Dijkstra. It is the most optimal sort for 3 unique values (eg. 0, 1, 2) in a sequence. DNF can sort a sequence of n size ...