FANDOM


QuestionEdit

Write an implementation of quicksort. Use insertionsort (you don't need to write the insertionsort method) as a fallback for small-sized arrays.

  1. Is quicksort a stable sort?
  2. Explain what choice of pivot you made and why.
  3. What is the time complexity?
  4. What is the space complexity?

AnswerEdit