Description
Solutions
Submission
Plan Cuts 🐡

An automated cutting machine is used to cut rods into segments. The cutting machine can only hold a rod of minLength or more. A rod is marked with the necessary cuts and their lengths are given as an array in the order they are marked. Determine if it is possible to plan the cuts so the last cut is from a rod at least minLength units long.

Example 1:

Input:  rodLengths = [3, 5, 4, 3], minLength = 9
Output: "Possible"
Explanation:
N/A for now 👉🙉👈

Example 2:

Input:  rodLengths = [4, 3, 2], minLength = 7
Output: "Possible"
Explanation:
N/A for now

Example 3:

Input:  rodLengths = [4, 2, 3], minLength = 7
Output: "Impossible"
Explanation:
N/A for now

Example 4:

Input:  rodLengths = [5, 6, 2], minLength = 12
Output: "Impossible"
Explanation:
N/A for now
Constraints:
    Unknown for now 🥲
Thumbnail 0
Testcase

Result
Case 1

input:

output: