What is time complexity of C#\'s List
I guess it\'s o(N)
But after I searched a lot, I didn\'t get any accurate result.
From the documentation:
On average, this method is an O(n log n) operation, where n is Count; in the worst case it is an O(n ^ 2) operation.
This is because it uses Quicksort. While this is typically O(n log n), as mentioned on Wikipedia, "Quicksort is often faster in practice than other O(n log n) algorithms"