LeetCode 1431 - Kids With the Greatest Number of Candies - Python Solution

Опубликовано: 15 Август 2026
на канале: Code with Carter
5,297
71

Solution Blog: (sign into leetcode to view)
https://leetcode.com/problems/kids-wi...

Just grab the maximum number of candies in the array.
Iterate through the list, set True if by adding extraCandies to the current number of candies is greater than or equal to the Result of Step 1 ^, False otherwise.

Hope this helped a little - have an awesome day!

Time complexity: O(N)
Space complexity: O(1)