advent2026

Advent of Code 2026 (lua)
git clone git://bsandro.tech/advent2026
Log | Files | Refs

commit e8b158bb3167b555c2135961d7c272383cc4b261
parent 1d3a8049fcc8def5234ea37f11204202657fff07
Author: bsandro <email@bsandro.tech>
Date:   Tue,  1 Dec 2026 21:47:30 +0200

day 01 removed second sort

Diffstat:
Mday01.lua | 6+-----
1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/day01.lua b/day01.lua @@ -23,12 +23,8 @@ end print("part 1:", answer1) -table.sort(fixed, function(a, b) - return a.count<b.count -end) - local answer2 = 1 -for i=1,3 do +for i=#fixed,#fixed-2,-1 do answer2 = answer2 * fixed[i].id end