We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 20ae048 commit 765cba0Copy full SHA for 765cba0
2022/day01/day01.go
@@ -15,7 +15,7 @@ func main() {
15
}
16
17
func partOne(lines []string) {
18
- elfCaloriesMap := getAllocatedCaloriesPerElf(lines)
+ elfCaloriesMap := getSummedUpCaloriesPerElf(lines)
19
elf, calories := getElfMostCalories(elfCaloriesMap)
20
log.Println(elf, calories)
21
@@ -32,7 +32,7 @@ func getElfMostCalories(elfMap map[string]int) (string, int) {
32
return elf, calories
33
34
35
-func getAllocatedCaloriesPerElf(lines []string) map[string]int {
+func getSummedUpCaloriesPerElf(lines []string) map[string]int {
36
var elfCalories = make(map[string]int)
37
var elfNumber = 1
38
for _, stringCalories := range lines {
0 commit comments