Is 1, 2, 3, 4, 5 with Pivot 1 the worst-case quicksort scenario and why?

The question might be too simple, but I really don't understand why, for example, 1,2,3,4,5 with Pivot at the beginning is the worst case scenario.

I'm new to this, so please explain it to me very simply? What versus what and how many times?

Many thanks,

Dasha

+3


source to share





All Articles