Alfred's algorithm or time sorting can be selected