CRED SDE OA (2023) | Interval Dynamic Programming Optimization and Cost Minimization Problem
Cred · Question · Posted Jun 2026
Q1. Minimum Cost to Cut a Stick Problem Statement Given a wooden stick of length n and an array cuts where cuts[i] denotes a position at which the stick must be cut, determine the minimum total cost required to perform all cuts. The cost of making a cut is equal to the length of the current stick segment being cut. You may perform the cuts in any order. Return the minimum total cost required to complete all cuts. Example 1 ...
The full answer & interview discussion are available to premium members.
Log in Create a free account