selection and quick sort