You're assuming the fallacy that it takes less time for an explicit solution. The solution took less than 2 minutes and most of that time was spent trying to figure out how to manipulate the puzzle pieces. Now if you're talking execution time, yes conditionals and loops add to the complexity of the execution, but for any non-trivial graph, the implementation time of a non-pattern recognizing solution would be much greater.
In any case, the points I'm trying to make are simple:
1) Solid program execution is much more important than line reduction.
2) Defining a problem space / limitations allows for better code / reuse.
3) When the implementation trade off is sufficiently small, it's better to increase the scope of the solution for possible reuse.
In any case, the points I'm trying to make are simple:
1) Solid program execution is much more important than line reduction.
2) Defining a problem space / limitations allows for better code / reuse.
3) When the implementation trade off is sufficiently small, it's better to increase the scope of the solution for possible reuse.