can i use both top down and bottom up in any question of dp or it is applicable only in some question.
Dynamic programming
Hey you can use both approaches in all the questions but most of the time BU approach is preferred because in top down there is some recursion overhead(extra time & space ).