In case of the dynamic programming approach the value of an optimal solution is computed in :

Bottom-up fashion.

So, the correct answer is $(B).$

Ref: https://www.radford.edu/~nokie/classes/360/dynprog.html