CIS 1500 Chapter Notes - Chapter 11: Binary Search Algorithm

50 views1 pages

Document Summary

Recursive algorithm solves a problem by breaking it into smaller problems. The base case is what the recursive algorithm describes to be done. The term recursive refers to a repeated algorithm by other smaller applications of the same problem. When a function calls other functions it is called a recursive function. Binary search halves a range starting at the midpoint. Use many print statements to see where something went wrong. Add a parameter to print spaces to see how deep it went into the recursion. Conditional compilation is a more advanced way to debug. Common error is to not cover every base case! Common error is to write a base case that is never met!

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers
Class+
$8 USD/m
Billed $96 USD annually
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
30 Verified Answers

Related Documents