Recursive sortig simplification