LeetCode --- 1431. Kids With the Greatest Number of Candies 解题报告

Posted 杨鑫newlfe

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了LeetCode --- 1431. Kids With the Greatest Number of Candies 解题报告相关的知识,希望对你有一定的参考价值。

There are n kids with candies. You are given an integer array candies, where each candies[i] represents the number of candies the ith kid has, and an integer extraCandies, denoting the number of extra candies that you have.

Return a boolean array result of length n, where result[i] is true if, after giving the ith kid all the extraCandies, they will have the greatest number of candies among all the kids, or false otherwise.

Note that multiple kids can have the greatest number of candies.

Example 1:

Input: candies = [2,3,5,1,3], extraCandies = 3
Output: [true,true,true,false,true] 
Explanation

以上是关于LeetCode --- 1431. Kids With the Greatest Number of Candies 解题报告的主要内容,如果未能解决你的问题,请参考以下文章

leetcode1431. Kids With the Greatest Number of Candies

leetcode1431. Kids With the Greatest Number of Candies

LeetCode --- 1431. Kids With the Greatest Number of Candies 解题报告

1431. Kids With the Greatest Number of Candies

LeetCode 1431. 拥有最多糖果的孩子

LeetCode1431.拥有最多糖果的孩子