Leetcode Practice
LC 1071. Greatest Common Divisor of Strings
- Last updated
- Reading time
- 1 min read
The problem
Time
Solution -function kidsWithCandies(candies: number[], extraCandies: number): boolean[] {
const max = Math.max(...candies)
let answer: boolean[] = []
for (let candy of candies) {
answer.push(candy + extraCandies >= max)
}
return answer
}