Cut Wood - Given an array of wood lengths and a target length, determine the maximum height at which to cut all pieces so that the sum of the remaining lengths is greater than or equal to the target
Leetcode 1891. Cutting Ribbons
Given an array of ribbon lengths and a target k, determine the maximum integer piece length you can cut the ribbons into so that you obtain at least k pieces (return 0 if impossible). This is solved by searching the largest feasible length and testing feasibility by counting how many pieces each ribbon yields.
Onde essa pergunta já apareceu
Use esses exemplos para entender em que contexto ela costuma cair e adaptar sua prática.
Materiais associados
Nenhum anexo público associado a esta pergunta.
Depois de treinar essa pergunta, vale abrir outras do mesmo tipo e da mesma senioridade para comparar padrões de resposta.
Isso ajuda a sair da memorização de uma resposta só e entrar em repertório real de entrevista.
Continue a preparação com o banco completo
No app você encontra perguntas parecidas, compara empresas e aprofunda essa busca com mais filtros.