Grokking Dynamic Programming Patterns for Coding Interviews
Ask Author
Back to course home

0% completed

Vote For New Content
The C++ code is doing a lot of pointless stuff. A virtual function, why? Heap al...

Adam Sweeney

Jul 29, 2022

The C++ code is doing a lot of pointless stuff. A virtual function, why? Heap allocating the functor, again, why? It should have just been a free function.

1

0

Comments
Comments
A
Adam Sweeney3 years ago

And heap allocating with with new instead of std::make_unique, so doubly bad there.

On this page

Characteristics of Dynamic Programming

Overlapping Subproblems

Optimal Substructure Property

Top-down with Memoization

Bottom-up with Tabulation