yogan / advent-of-code

Advent of Code solutions
4 stars 0 forks source link

Days to Solve in Vim Workshops / Barcamp Sessions #54

Open yogan opened 4 weeks ago

yogan commented 4 weeks ago

Collection of unsolved days that look easy enough to solve with Vim in a 45 minute ensemble programming session (e.g. at barcamps or workshops). Star rating (1–5) is an estimate how easy and fun the puzzle is to solve with Vim.

2017 Day 1 ★★★

doable, but not super easy - requires shifting input (one very long line of digits) and comparing digit by digit, then summing matching digits - the comparing and removing non-matching might be a bit tricky (at least without VimScript)

~2017 Day 2~

~2017 Day 3~

2017 Day 4 ★★

good puzzle if only little time available - check for duplicate strings (space separated) in lines - this is just a backreference (`\1`) in the match side of a regex - very easy when you know that, but also no really cool Vim stuff

2017 Day 5 ★★★★

Vim movements! plus a little VimScript - list of instructions (numbers) that are movements up and down within the instructions - increase offset after jump - seems fun to do with Vim (`j`/`k`/`^A`) - counting steps and checking for exit conditions requires some VimScript