Suggestions
Use up and down arrows to review and enter to select.Please wait while we process your payment
If you don't see it, please check your spam folder. Sometimes it can end up there.
If you don't see it, please check your spam folder. Sometimes it can end up there.
Please wait while we process your payment
By signing up you agree to our terms and privacy policy.
Don’t have an account? Subscribe now
Create Your Account
Sign up for your FREE 7-day trial
Already have an account? Log in
Your Email
Choose Your Plan
Individual
Group Discount
Save over 50% with a SparkNotes PLUS Annual Plan!
Purchasing SparkNotes PLUS for a group?
Get Annual Plans at a discount when you buy 2 or more!
Price
$24.99 $18.74 /subscription + tax
Subtotal $37.48 + tax
Save 25% on 2-49 accounts
Save 30% on 50-99 accounts
Want 100 or more? Contact us for a customized plan.
Your Plan
Payment Details
Payment Summary
SparkNotes Plus
You'll be billed after your free trial ends.
7-Day Free Trial
Not Applicable
Renews December 10, 2023 December 3, 2023
Discounts (applied to next billing)
DUE NOW
US $0.00
SNPLUSROCKS20 | 20% Discount
This is not a valid promo code.
Discount Code (one code per order)
SparkNotes PLUS Annual Plan - Group Discount
Qty: 00
SparkNotes Plus subscription is $4.99/month or $24.99/year as selected above. The free trial period is the first 7 days of your subscription. TO CANCEL YOUR SUBSCRIPTION AND AVOID BEING CHARGED, YOU MUST CANCEL BEFORE THE END OF THE FREE TRIAL PERIOD. You may cancel your subscription on your Subscription and Billing page or contact Customer Support at custserv@bn.com. Your subscription will continue automatically once the free trial period is over. Free trial is available to new customers only.
Choose Your Plan
For the next 7 days, you'll have access to awesome PLUS stuff like AP English test prep, No Fear Shakespeare translations and audio, a note-taking tool, personalized dashboard, & much more!
You’ve successfully purchased a group discount. Your group members can use the joining link below to redeem their group membership. You'll also receive an email with the link.
Members will be prompted to log in or create an account to redeem their group membership.
Thanks for creating a SparkNotes account! Continue to start your free trial.
Please wait while we process your payment
Your PLUS subscription has expired
Please wait while we process your payment
Please wait while we process your payment
The basic concepts and ideas involved with recursion are simple: a function that has to solve a big problem uses itself to solve a slightly smaller problem. Understanding the basic idea is fairly straightforward. However, to truly understand the intricacies of recursion, and to be able to use it well in one's own programs, requires a lot of practice. The best way to obtain this practice is to write a lot of recursive functions. In this section we'll do just that.
We begin with the string library. The section will cover both iterative and recursive implementations of many string library functions, showing the similarities and the differences in the approaches taken. Note that if you were to implement most of these functions for real world use, you would not do them recursively for efficiency reasons. However, they provide good ground for practice.
Next we'll look at how recursion can be used in searching and in sorting to increase the efficiency of these operations. Then we'll look at how recursion can be used for certain mathematical problems, such as printing a number in different bases and computing different sequences of numbers. For most of these problems, recursion presents an incredibly elegant solution that is easy to code and simple to understand.
We will then explore how recursive functions make using inherently recursive structures, such as trees, much easier. If you are unfamiliar with trees, please see the SparkNote on the topic.
Lastly, we will look at how recursion can be used to solve well-known problems, such as The Towers of Hanoi.
You should go through the examples in this section thoroughly. Study each example for as long as you need to understand it fully. Many examples are presented, and if you can come away with a complete understanding what each one is doing, you will have a firm grasp on how recursion works.
Please wait while we process your payment