You are given an integer array ribbons where each element represents the length of a ribbon, and an integer k. You are allowed to cut any ribbon into any number of positive integer length segments, or leave it uncut.
Return the maximum possible positive integer length of ribbon segments such that you can obtain at least k ribbons of that identical length. If it is impossible to obtain at least k ribbons of the same positive integer length, return
Constraints:
ribbons.length
ribbons[i]
k
You are given an integer array ribbons where each element represents the length of a ribbon, and an integer k. You are allowed to cut any ribbon into any number of positive integer length segments, or leave it uncut.
Return the maximum possible positive integer length of ribbon segments such that you can obtain at least k ribbons of that identical length. If it is impossible to obtain at least k ribbons of the same positive integer length, return
Constraints:
ribbons.length
ribbons[i]
k