> A little thought experiment: How would you write a comprehensive
> postcondition to a function that sorts a list/array of elements?
> (Assume there is no reliable third-party sorting function available.)
Sorting a container is at best O(n log n), but determining whether one
is already sorted is only O(n). :-)
--
http://blog.orphi.me.uk/
http://www.zazzle.com/MathematicalOrchid*
Post a reply to this message
|