Back to problems

Cutting Ribbons (LC 1891)

Algorithm · Google · Medium

Cutting Wood Medium · Topics · Company Tags · Hints You are given an integer array woods, where woods[i] is the length of one piece of wood. You want to obtain at least k pieces of the same length. Each resulting piece must come from a single original piece; leftover material from different pieces cannot be combined into one new piece. For a chosen length L, an original piece of length wood contributes wood // L pieces. Return the largest positive integer L such that the…

Checking your access…