MadMax sort