Challenge #10 – How fast can you sort 1,000,000 class items
A company sells Widgets which it stores in its warehouse. In this challenge design an algorithm to quickly sort the In Stock Units in the following order Price, Description, Color, UnitId, and StockDate. All Items in the warehouse must be sorted. Note there are many duplicate items.
A prototype of this method is highlighted in the code sample below and highlighted yellow.
You may use any collection class to store and send the data to the sort method, but you cannot do anything to preprocess, format or sort the data prior to calling your sort method.
The Winner of this Challenge will produce a result that sorts the class in the FASTEST time as measured by the embedded stopwatch function in the code below.
The following was the best solution submitted by Sebastien Muller!
Winners (out of approximately 10 respondents)
Thanks everybody for your responses to SCS Coding Challenge #10!!!
Most all respondents came up with good approaches.
Coding Challenge #11
Please stay tuned, SCS Coding Challenge #11 will be published later this week. Details will follow. The winner will be awarded based upon the best approach.