CST 370 Week 7
The topic I focused on the most this week was dynamic programming. I have not used this technique to solve coding problems yet but I have used a dynamic approach to solve written problems on quizzes. Throughout quizzes in this class, I have written out the pseudocode for a given problem to calculate the output by hand. In some instances, it is time consuming to draw out every operation of a function especially for a recursive function. Instead of drawing out every iteration of the recursive function, I would plug in the return value of the function if I had calculated it already for a given input. The idea of solving problems with the values of sub problems was a main focus of the dynamic programming lecture material. This approach to problem solving was applied to the coin board problem, coin row problem, and finding the nth number in the fibonacci sequence.
Comments
Post a Comment