Import AdventOfCode2018 JavaScript solutions

git-subtree-dir: AdventOfCode JS/2018
git-subtree-mainline: b44957b275
git-subtree-split: 5e9be1b66b
This commit is contained in:
Josh Creek
2026-07-12 19:58:48 +01:00
16 changed files with 1576 additions and 0 deletions
+15
View File
@@ -0,0 +1,15 @@
--- Part Two ---
Confident that your list of box IDs is complete, you're ready to find the boxes full of prototype fabric.
The boxes will have IDs which differ by exactly one character at the same position in both strings. For example, given the following box IDs:
abcde
fghij
klmno
pqrst
fguij
axcye
wvxyz
The IDs abcde and axcye are close, but they differ by two characters (the second and fourth). However, the IDs fghij and fguij differ by exactly one character, the third (h and u). Those must be the correct boxes.
What letters are common between the two correct box IDs? (In the example above, this is found by removing the differing character from either ID, producing fgij.)