Pergunta de entrevista da empresa IBM

Array Generator. Among all such arrays, return the lexicographically smallest one. If there is not an array that satisfies the conditions, then return an array with the single element -1.