3 ms·
One advantage could be ease of refactoring. Imagine starting with "goal: the list is sorted", but the resulting program is uses too much space to achieve it. It
by mLuby 10y ago
One advantage could be ease of refactoring.
Imagine starting with "goal: the list is sorted", but the resulting program is uses too much space to achieve it.
It could be a lot easier to add "goal: the list is sorted in O(n) space" than it is to rewrite your sorting algorithm.