Optimized merge sort case where l or r is 0.