this post was submitted on 10 Dec 2024
6 points (100.0% liked)

NotAwfulTech

385 readers
3 users here now

a community for posting cool tech news you don’t want to sneer at

non-awfulness of tech is not required or else we wouldn’t have any posts

founded 1 year ago
MODERATORS
 

The previous thread has fallen off the front page, feel free to use this for discussions on current problems

Rules: no spoilers, use the handy dandy spoiler preset to mark discussions as spoilers

you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 3 points 2 weeks ago (5 children)

Day 11!

discussion p1 + 2I'd say this was pretty easy. My instinct was that 64 bit ints were big enough for this problem, and that memoising would also be a good idea. I didn't experiment with a control though, so I don't know if memoisation was truly necessary. Either way, my initial solution for 1. was performant enough for part 2.

[–] [email protected] 2 points 2 weeks ago* (last edited 2 weeks ago) (2 children)

followupSo memoisation is predictably needed for part 2 to run in time. It's an O(e^n^), so it takes seconds by step 39 and minutes by step 47.

[–] [email protected] 3 points 2 weeks ago* (last edited 2 weeks ago) (1 children)

re:followupIf you somehow wanted your whole final array it would also require over 1 Peta byte ^^, memoization definetely reccomended.

[–] [email protected] 4 points 2 weeks ago

spoilerIt's one AOC problem zogwarg, what could it cost? 10 PB?

load more comments (2 replies)