Generally, I start each problem defining the domain models which capture all the information provided via the input. Then, once I've completed parsing into that data structure, I'll solve the problem.
I prefer functional/immutable data-oriented approaches over dynamic ones.
Use commands like the following to run and experiment with the TypeScript solutions. If you don't have deno
, you can follow the installation instructions.
deno run -A --watch ./part-1.ts
deno run -A --watch ./part-2.ts