-*Aha!* one of the knapsacks in the sample data has 'L' as a common item, twice
-*Aha!* one of the knapsacks in the sample data has 'L' as a common item, twice
- Sum the priorities of all the "common items"
- Sum the priorities of all the "common items"
### Part 2
The subproblems are
- Determine an item's priority (solved from part 1)
- ~~Determine which items are present in exactly three knapsacks~~
- ~~Determine which knapsacks each item is in~~
- ~~I'm not sure that it matters, but what if a "triplet item" occurs multiple times in a knapsack; is it no longer a "triplet item"? We probably could check by finding out if an elf is in more than one triplet.~~
- Looks like I misread the problem statement originally. It seems that we don't need to find the triplets; the triplets appear in order in the data, knapsacks {*i*, *i+1*, *i+2*}
- Assume the number of knapsacks is divisible by 3
- Determine which item is common in each triplet
- Assume each triplet has exactly one "triplet item"
- Sum the priorities of all the "triplet items"
### Refactoring opportunity
Both problems involve finding a singular common character -- one among two strings, the other among three.