A

Admin • 831.35K Points
Coach

Q. Which is the worst method of choosing a pivot element?

  • (A) first element as pivot
  • (B) last element as pivot
  • (C) median-of-three partitioning
  • (D) random element as pivot

Explanation by: Admin
choosing the first element as pivot is the worst method because if the input is pre-sorted or in reverse order, then the pivot provides a poor partition.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.