At a Diwali party, n children are holding candies. candies[i] is the number of candies the i-th child has. You also have extraCandies more candies.
For each child, imagine you give that child all the extra candies. Would the child then have at least as many candies as every other child?
Return a list of n booleans. The i-th value is true if the answer is yes for the i-th child, otherwise false.
Several children can share the highest number.
Examples
Example 1:
Input: candies = [1,4,2], extraCandies = 2
Output: [false,true,true]
Explanation: Child 0: 1 + 2 = 3 is less than 4, so false.
Child 1: 4 + 2 = 6, so true.
Child 2: 2 + 2 = 4 ties with the best, so true.
Example 2:
Input: candies = [5,5,5], extraCandies = 1
Output: [true,true,true]
Explanation: Everyone has the same number, so whoever gets the extra candy is at the top.
Example 3:
Input: candies = [3,9,6,9], extraCandies = 3
Output: [false,true,true,true]
Explanation: Child 0 reaches only 6, so false. Child 2 reaches 9, which ties with the best, so true. The two children with 9 stay on top.