this post was submitted on 01 Dec 2023
17 points (100.0% liked)
NotAwfulTech
357 readers
1 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
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
spoiler
DP to me is when you use memoisation and sometimes recursion and you want to feel smarter about what you did.I also struggle to think of the need for DP, even in a more “elegant” approach. Maybe if you wanted to do an O(n) memory solution instead of n^2, or something. Not saying this out of derision. I do like looking at elegant code, sometimes you learn something.
I feel like there’s an unreadable Perl one line solution to this problem, wanna give that a go, @gerikson?
spoiler
Part 2 only, but Part 1 is very similar.I'm pretty sure you could make this one line and unreadable ^^.
Now this is content
Here's where I landed in dart
no comments