How to break quicksort (igoro.com)
submitted by
igoro(800) 1 year, 9 months ago
Quicksort usually runs in O(N log N) time, but in special cases, it takes much longer: O(N^2). It is surprisingly easy to force any quicksort implementation to degrade into the quadratic-time behavior. This trick even works against a randomized quicksort! The article demonstrates how the trick works by applying it against the BCL Array.Sort() routine.
|
category: C#
|
Views: 7
tags:
Algorithms CodeThinked C# .Net another
Everyones tags:
Your Tags: