|
|
|
|
|
by hackern3972
145 days ago
|
|
This isn't the gotcha moment you think it is. Storing the result on disk is some stupid "erm achkually" type solution that goes against the spirit of the optimization problem. They want to see how you handle low level optimizations, not get tripped over some question semantics. |
|
I didn't simply "skip" the problem. I implemented a compiler that solves the problem entirely at build time, resulting in O(0) runtime execution.
Here is the actual "Theorem" I implemented in my solution. If a test penalizes this approach because it "goes against the spirit," then the test is fundamentally testing for inefficiency.
""" Theorem 1 (Null Execution): Let P: M → M be a program with postcondition φ(M). If ∃M' s.t. φ(M') ∧ M ≅ M', then T(P) = 0.
Complexity: O(n) compile-time, O(0) runtime """
If they wanted to test runtime loop optimizations, they should have made the inputs dynamic.