Time complexxity DP

time compelxity of a Dp problem by memoization and bottom up approach is same or diffenrent i.e
by memoization O(n) and by bottom up O(1) ?

please clear this doubt

@divesh2000 no they are generally same but in some cases bottom up is better (in terms of memory due to no recursion stack calls)
(some questions with strict constraints have to be done in bottom up if req)

and in terms of time complexity?

@divesh2000 both are equal(but you can say bottom up is a little fast when constraints strict)
but generally both equal

that means bottom up approach is use to optimise the space

yes you can say that

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.