An implementation of Dijkstra's smoothsort algorithm in python3, ported from a Delphi implementation