Buttom up approach

what is the aproach for buttom up?

Were you able to code the top down approach first?

yes i have solved by top down.

I am trying to solve by buttom up approach?

Okay then use cout statements accordingly and check how the dp table is being filled.

I am unable to write loops for buttom up?

Once you understand this, you will be able to code the bottom up approach. And the approach remains the same, just the code changes. Also, there is no need to solve a dp question using both ways. You would be wasting a lot of time. One is enough.
Still, if you want to code it using bottom approach, send me your code and question’s link on hackerblocks.

share your hackerblock profile link.

You can share the links here.

https://online.codingblocks.com/app/player/193164/content/184293/5213/code-challenge

This link opens up your course and I don’t have access to that. Search the question in your contest on hackerblocks. And share that link please.

that question is not showing on hackerblocks.

Okay thanks. I will try it. All solutions which I saw till now use top down approach only. Some questions are better solved and understood using a single approach. Like for the LIS question of dp, we never use the recursive approach. We always do it using bottom up approach.

But we know the approach to solve top down also for lis

I want to know only how can i solve it by buttom up approach.

Okay I will try it and let you know.

Ok please solve it with buttom up.

I have posted one more doubt please see that also.