Need help with the bottom up approach in the given question

can you suggest me the way to do bottom up