Programming, Topic: NP Complete

Recent posts

AoC 2025 Day 12: Knapsackinator

Source: Day 12: Christmas Tree Farm

Full solution for today (spoilers!).

Part 1

Solve the knapsack problem.

But really, you are given a set of tiles (which all happen to be some subset of a 3x3) and a set of constraints–a MxN grid and how many of each tile to place. Count how many constraints are possible.

Tiles may be rotated and/or flipped.

read more...

AoC 2024 Day 23: LAN Partinator

Source: Day 23: LAN Party

Full solution for today (spoilers!).

Part 1

You are given the edges of an undirected graph. Count how many complete subgraphs of size three exist that contain one or more starting with the letter t.

Aside: Games with local (but not hotseat) multiplayer have gotten rather rarer over the years… how many people still know what a LAN party is/was?

read more...


All posts