Skip to content

wincus/adventofcode2022

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Advent of Code Solutions

This are my solutions to the AdventOfCode 2022 programming puzzles written in the Go programming language.

I would strongly suggest that you try to solve the puzzles before checking the solutions.

Setup instructions

Each user gets a different set if input data for each puzzle. To run the solutions yourself you will need first to get your session token exported.

You can get yours by logging into AdventOfCode and inspecting your cookies contents. You should have a cookie for the .adventofcode.com domain. Export the cookie value as:

export SESSION=536.........

Optionally you can install direnv on your terminal and then drop a .envrc file on the root of this git repo.

$ cat .envrc
export SESSION=536......

That way you won't need to export it manually ever again until your session expires and you need to update the session token :)

Structure

Each puzzle has a solutions/dayN directory for the main() function and a internal/dayN for the libraries and unit tests.

Each puzzle test expresses as close as possible the given puzzle instructions. Run go test -v in the internal/dayN directory to run a particular puzzle test.

You can get your solutions by running:

$ make dayN

where N is the day number. For example for the solutions for day1 you would run:

$ make day1

Each solution will show answers for Part1 and Part2.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published