D&C checklist: pass opt_l and opt_r bounds, compute mid correctly, update opt[mid], recurse with updated bounds. Knuth checklist: iterate by increasing interval length, track opt[i][j], make sure opt[i][j-1] and opt[i+1][j] are computed first. Boundary conditions: what is opt for base cases? Usually opt[i][i] = i or similar. Off-by-one errors are common. Verification: print optimal splits for small inputs. Check they're monotonic. If not, QI doesn't hold for your cost function.
Time complexity: .
Space complexity: in time and in space.