A colleague has set us a challenge - winner get a mars bar.
To be honest, I'm not bothered about the bar but the questions has stumped me and I am really curious to see if this can be done because I cannot think of way at all.....
Write a class that will take in a list of any type and return a sorted list of any type.
So for example, if I feed in a list of integers, it should return me a sorted list of integers
or if I feed in a list of DateTimes, it should return me a sorted list of DateTimes
This is where I break down, what if you feed in a list of a class I have written e.g. "MyClass". How can you return a sorted list of "MyClass"
Anyone have any ideas?
View Complete Post