Describe the differences between the top-to-bottom, bottom-to-top, and divide-and-conquer.
Better display a chart for differences
Will be upvoted!!!
Top to Bottom | Bottom to Top |
1. In top to bottom we basically focus on dividing problem into smaller pieces and then solving them. | 1. In bottom to top we solve the smaller problems and then combine them to solve the bigger problem |
2.Each smaller piece is programmed seperately so there will be redundancy |
2. Here redundancy can be minimised using techniques like data encapsulation. |
3. It is mainly used in debugging and dcumentation. | 3,. This approach is mainly used for testing. |
Divide and Conquer : It is one of the top to bottom approach , recursive , consumes more time and which inovlves three steps in each level of recursion
1. Divide : Divide problem into sub problems.
2. Conquer : solving the subproblems recursively.
3. Combine : combining the subproblems to solve the problem.
Get Answers For Free
Most questions answered within 1 hours.