Skip to content

Commit 390008f

Browse files
fix build
1 parent 1867c70 commit 390008f

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/main/java/com/fishercoder/solutions/_1103.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,11 @@
3939
* */
4040
public class _1103 {
4141
public static class Solution1 {
42-
public int[] distributeCandies(int candies, int num_people) {
42+
public int[] distributeCandies(int candies, int numPeople) {
4343
Map<Integer, Integer> map = new HashMap<>();
4444
int candy = 1;
4545
while (candies > 0) {
46-
for (int person = 1; person <= num_people && candies > 0; person++, candy++) {
46+
for (int person = 1; person <= numPeople && candies > 0; person++, candy++) {
4747
if (candies < candy) {
4848
map.put(person, map.getOrDefault(person, 0) + candies);
4949
candies -= candy;
@@ -54,8 +54,8 @@ public int[] distributeCandies(int candies, int num_people) {
5454
}
5555
}
5656
}
57-
int[] result = new int[num_people];
58-
for (int i = 1; i <= num_people; i++) {
57+
int[] result = new int[numPeople];
58+
for (int i = 1; i <= numPeople; i++) {
5959
if (map.containsKey(i)) {
6060
result[i - 1] = map.get(i);
6161
} else {

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy