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 April 27, 2024 April 20, 2024
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.
We're sorry, we could not create your account. SparkNotes PLUS is not available in your country. See what countries we’re in.
There was an error creating your account. Please check your payment details and try again.
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
In the first section, we alluded to the varying uses of trees, especially in the context of sorting and searching. The task of sorting consists of taking data and arranging it in some sort of predetermined order. Searching consists of trying to find a particular piece of data from the total set of data. As one might expect, searching is easier once the data have been sorted. For example, if one had a list of numbers, searching would mean checking whether or not a specific number is in the list and if it is finding exactly where in the list it is. For a more comprehensive discussion of sorting and searching, with particular emphasis on the complexity of the different sorts and searches, see the sorting and searching SparkNotes. Here we will be covering binary search trees more from a practical, rather than a theoretical, perspective.
A binary search tree is one where all of the data in the nodes in the left subtree come before the data in the current node with regard to some ordering scheme, and all the nodes in the right subtree come after. This condition must be true for all of the nodes in the tree. For example:
The above is a binary search tree for integers, while the following is not:
In a binary search tree, the smallest element will always be the one found by following the subtrees to the left until you reach a leaf. Similarly, the largest is found by traveling to the right until a leaf is reached.
In this topic, we will cover both how to build a binary search tree from a data set as well as how to use it in searching.
Related to this topic is the heap, a tree in which the root node is greater than all of its descendants and in which the subtrees are also heaps.
Please wait while we process your payment