Added testing cases and improve merge sort and quick sort