{"id":25167277,"url":"https://github.com/zrei/aoc23","last_synced_at":"2026-05-01T14:33:15.503Z","repository":{"id":210519500,"uuid":"726668852","full_name":"zrei/aoc23","owner":"zrei","description":"Attempts for aoc 2023, in cpp and python.","archived":false,"fork":false,"pushed_at":"2024-01-02T08:25:09.000Z","size":468,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-03T18:18:40.940Z","etag":null,"topics":["aoc","cpp","python"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zrei.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-12-03T02:42:31.000Z","updated_at":"2025-01-16T02:59:28.000Z","dependencies_parsed_at":"2024-01-02T08:36:22.663Z","dependency_job_id":"33b86e55-7c63-4ee7-a7ee-a2ee834eb80d","html_url":"https://github.com/zrei/aoc23","commit_stats":null,"previous_names":["zrei/aoc23"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/zrei/aoc23","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zrei%2Faoc23","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zrei%2Faoc23/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zrei%2Faoc23/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zrei%2Faoc23/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zrei","download_url":"https://codeload.github.com/zrei/aoc23/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zrei%2Faoc23/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32501399,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-30T13:12:12.517Z","status":"online","status_checked_at":"2026-05-01T02:00:05.856Z","response_time":64,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["aoc","cpp","python"],"created_at":"2025-02-09T06:32:25.699Z","updated_at":"2026-05-01T14:33:15.483Z","avatar_url":"https://github.com/zrei.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# AOC 2023\nAttempts for AOC 2023. Code is done first in CPP for practice, and then done in Python.\n\n## Day 1\n* Learning to compile cpp programs locally using `C++ 20`\n* Discoving `find()` and `rfind()` are a thing\n* Familiarising myself with pointers and aliases, vectors and maps\n* Identifying characters that are digits and working with characters as integers\n\n## Day 2\n* Learning to split a string by a separator in cpp\n\n## Day 3\n* Finding an efficient way to solve the problem\n\n## Day 4\n* Misunderstanding part 2 for an hour :\u003c\n\n## Day 5\n* Learning to work with bigger numbers by using `unsigned int` and `unsigned long` to prevent overflow\n* Coming up with a strategy for part 2 and deciding to reverse engineer the ranges of seeds that correspond to ranges of locations, sorted by ascending location\n\n## Day 6\n* Learning to work with even larger numbers by using `long long` and `double` to prevent overflow\n\n## Day 7\n* Deciding to try out enums in cpp for the first time to represent the hand types\n\n## Day 8\n* Figuring out that I could use LCM for part 2\n\n## Day 9\n* Fairly simple day today! ^-^\n\n## Day 10\n* Implementing BFS in cpp\n* Using structs to represent the tiles\n\n## Day 11\n* Being off-by-one and suffering for it :\u003c\n\n## Day 12\n* Implementing memoisation in cpp\n* Getting stuck for a bit on the non-brute-force method for finding the number of possible combinations for a specific sequence because of stupid mistakes\n* More integer overflow\n* Got interrupted on this one due to a plane flight\n\n## Day 13\n* Will be overseas for the remaining days on holiday and doing these at night or on trains, let's see how it goes!\n* Relatively easy day today\n\n## Day 14\n* Finding the point at which the dish state repeats: a lot like getting stuck on these types of puzzles in old-school RPGs\n\n## Day 15\n* Doing this one while really tired, but it wasn't too bad (except for reading comprehension on part 2)\n* Forgot to reset the box number for a bit though\n\n## Day 16\n* More bfs\n\n## Day 17\n* Implementing Dijkstra's in cpp \n* Using the cpp priority queue\n* Using a struct as the key for a map\n* Failing on the memoisation for a bit\n\n## Day 18\n* Optimising my solution for part 1 so it could run for part 2 by using a priority queue\n* There's an easier mathematical solution T_T\n\n## Day 19\n* Tried to do it in a more OOP manner by using structs to represent the parts\n* Had a bit of a problem with part 2 initially as I wasn't aware the ranges for each individual part do not overlap\n\n## Day 20\n* Did part 1 in an OOP manner with polymorphism by representing each module type as a child class of a module parent class\n* Tried brute forcing part 2 for a bit before learning that I had to use LCM\n\n## Day 21\n* Did part 1 with bfs that memoised based on both coordinates and path length\n* For part 2, I optimised the bfs to memoise only based on coordinates since any point reached with an even number of steps remaining will be reachable by the end\n\n## Day 22\n* Mostly just brute forced part 1, though I ran into a minor issue where I missed out some of the cases where a block can support another\n* Part 2 uses a traversal of the tower\n\n## Day 23\n* Part 1 used BFS and noted the direction a tile was entered from to prevent loops\n* For part 2, all junctions were found and DFS between the entrance to the exit through these junctions were done\n\n## Day 24\n* Part 1 just involved formulating a simple two unknown, two equation simultaneous equation and solving it\n* For part 2, I learned how to use Z3 with cpp to solve the more complicated simultaneous equations\n\n## Day 25\n* Learned how to implement Karger's (Had learned the algo in class before but never used it practically)\n\n![end](img/end.png)\n\nI took an additional four days after Christmas to complete AOC'23, but I managed to finish all parts before my flight back home :D\u003cbr/\u003e\nI didn't have enough time to keep up doing both Python and cpp versions, so for most days I ended up doing only the cpp version since I'm trying to learn how to use cpp.\u003cbr/\u003e\nI learned a lot about cpp syntax and things specific to the language, so this was a great learning experience and it was fairly fun as well, even if I got stumped on a lot of the later days and had to consult the subreddit for hints.\n\nHopefully I'll get to do AOC'24 too!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzrei%2Faoc23","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzrei%2Faoc23","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzrei%2Faoc23/lists"}