银河美术馆 Gallery of Galaxy

银河美术馆 Gallery of Galaxy, Beautyyu言醴's Blog

  • Blog
  • About
  • RSS
  • Search
  • Program (7)
  • Weekly (11)
  • Life (2)
  • Tech (2)
  • Algorithm (1)
  • Learn (1)
  • Rust (1)
  • EN (1)
  • ZH (1)

Details of Quick Sort

Mar 29, 2023

Quick Sort has an average-case performance of O(n log n). However, the worst-case performance happens when the pivot element selected is either the smallest or largest element in the list. This may occur in two scenarios: when the array contains all the same elements, or when the elements are already sorted.


© Beautyyu言醴 2022 - 2023