Forgive me if this is a stupid question ... but I believe in my Comp. Sci. classes, and I clearly remember how several sorting algorithms and the corresponding Big O notation were studied / polled.
However, in addition to the class, I never wrote code for sorting.
When I get the results from the database, I use "Order By". Otherwise, I use a collection class that implements sorting. I applied IComparable to enable sorting; but I never went beyond that.
Was sorting always just an academic pursuit for those of us who don't implement languages / frameworks? Or is it just that modern languages running on modern equipment make you worry about the little things?
Finally, when I call .Sort on the (Of String) list, for example, which sorting algorithm is used under the hood?
While you rarely need to implement a sorting algorithm, you realize that various algorithms and their complexity can help you solve more complex problems.
Finally, when I call .Sort on a List (Of String), for example, which sorting algorithm is used under the hood?
Quick sort
I have never implemented my own sorting algorithm since I took my CS classes in college, and if I even thought about writing my own, I would like my chapter to be considered first.
List<T> Quicksort MSDN:
List<T>
http://msdn.microsoft.com/en-us/library/b0zbh7b6.aspx
, , ...
, , , O (omicron).
, , - , , .
, , / .
.
, . , , .
.Sort , .
, . , , . , , , , , .
, .Net defualt, , Quicksort Shellsort. , - .
, , (,.Net 1.1 Windows CE Java somesuch).
, , ORDER BY T-SQL.
ORDER BY
- , , , , , , , ..
, , quicksort.
, /? , , , ?
, , , . , . .
, , . , , ? , : Honda, Lexus, Toyota, Acura, Nissan, Infiniti
, : Acura, Ford, Honda, Hyundai, Lexus, Toyotap >
, ? Lexus, Toyota, Honda, Acura, Nissan, Infiniti.
I think you will need your own sorting method if this happens.