- Optimized sort algorithm