ORIGINAL COMPANY-CONTEXT PRACTICE
Plan board cuts with a clear optimality claim
Original practice scenario: A hypothetical home-improvement tool assigns requested board lengths to available stock lengths, accounting for saw-cut loss. Propose a practical algorithm and explain its limits.
Written for independent practice using company context; this is not a verified question from a company interview.
A REASONED APPROACH
Model answer.
Model the problem with explicit units, stock inventory and cut loss. A fast heuristic can produce a useful cutting plan, but it should not claim minimum waste without an optimization guarantee.
Work through it
- Validate positive requested lengths, required quantities and usable stock lengths, reserving kerf for each cut under a documented cutting convention.
- Try a descending-length placement heuristic or a bounded optimization method, tracking remaining usable length and opening additional stock only when necessary.
- Return the assigned cuts and waste by stock piece, checking conservation and testing exact fits, impossible requests and repeated sizes.
Tradeoffs to discuss
- Exact search may reduce waste for small inputs but grows expensive; heuristics are faster and need an honest quality bound or comparison baseline.
Common pitfalls
- Do not mix inches and centimeters or round away cut loss.
- The plan is a computational estimate; material defects and safe tool use require separate practical assessment.