non-dynamic approach for rod-cutting problem. Has complexity O(2^n), or exponential