We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7f009b3 commit a4efba7Copy full SHA for a4efba7
1431.拥有最多糖果的孩子.js
@@ -0,0 +1,9 @@
1
+/**
2
+ * @param {number[]} candies
3
+ * @param {number} extraCandies
4
+ * @return {boolean[]}
5
+ */
6
+var kidsWithCandies = function(candies, extraCandies) {
7
+ const max = Math.max(...candies);
8
+ return candies.map(n => n + extraCandies >= max);
9
+};
0 commit comments