105k views
3 votes
There are generally two ways of implementing dynamic programming solutions to problems, which have equal asymptotic time complexities. (The details of the problem may determine which is better in a given situation). What are they?

Select two:
1) Bottom-up
2) Left-to-right
3) Right-to-left
4) Top-down

1 Answer

4 votes

Answer:

1) Bottom-up

2) Top-down

Step-by-step explanation:

In general dynamic programming is a divide and conquer strategy which can be implemented using bottom up approach or top down approach.

Bottom-up approach in dynamic programming will solve a relatively simple sub-problem first and then use the solution to build and arrive at solutions to a bigger sub-problem.

Top down approach is reversed to bottom-up approach and is also known as Memoization Method. Instead of solving a problem started from the base state sub-problem, the top down approach break a problem into a smaller problems from the top most destination state until it reaches the bottom most base state.

User YoungFrog
by
4.6k points