Reputation: 811
I'll be writing the online Google test tomorrow as a fresher. Apparently, they definitely ask one problem on Dynamic Programming?
Does anyone know of a good resource for collection of DP problems in C along with solutions? I know what DP is & have used it on an occasion or twice. However I feel to crack a DP problem in test, prior practice of typical problems will make it easier to approach.
Any good resources or problem sets with solutions in C will be highly appreciated. Thanks.
Upvotes: 5
Views: 1748
Reputation: 2079
To practice you can take one of the available problems at SPOJ. To recognize DP ones easily you can check at Problems Classifier (keyword: dp).
Upvotes: 1
Reputation: 1129
I suggest u,collect a book "An Introduction to Bioinformatics Algorithms".This has a chapter fully on DP.As @templatetypedef mentioned Minimum edit distance,Optimal sequence alignment it has other problem with them.Though there is no implementation in it.You have to do it on your own.But you will find pretty interesting reading them.
Upvotes: 1
Reputation: 51316
The Topcoder website is amazing. Not all of the problems use DP, but many do. Free full access to all problems from past competitions, which are at 3 different difficulty levels, as well as after-match explanations of every single problem from the problem author. Not only that, but you can quickly dig up the source code solution submitted by any coder in the competition.
Haven't been back there for a while, but they allow at least C++, Java, C# and I believe several other languages now.
Upvotes: 1
Reputation: 373102
Okay, so I really hope this doesn't count as "shameless self-promotion," since all of these links are to code snippets I've posted on my personal site. If this is inappropriate, please let me know and I can take them down.
Here are a few fun DP problems that are pretty much classics:
Hopefully this is somewhat useful, and best of luck tomorrow!
Upvotes: 8