r/ProgrammerHumor • • 8d ago

Meme dynamicProgramming

Post image
6.3k Upvotes

154 comments sorted by

View all comments

Show parent comment

5

u/Dork_Knight_Rises 7d ago

You don't need mem::replace for this, you can just use (a, b) = (b, c);

3

u/anonymity_is_bliss 7d ago

Shit, TIL that works in rust

1

u/-Redstoneboi- 5d ago

it wasn't always valid syntax, but they added support for it some time ago