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
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 June 10, 2023 June 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 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
Problem : How does a hash table allow for O(1) searching? What is the worst case efficiency of a look up in a hash table using separate chainging?
A hash table uses hash functions to compute an integer value for data. This integer value can then be used as an index into an array, giving us a constant time access to the requested data. However, using separate chaining, we won't always achieve the best and average case efficiency of O(1). If we have too small a hash table for the data set size and/or a bad hash function, elements can start to build in one index in the array. Theoretically, all n element could end up in the same linked list. Therefore, to do a search in the worst case is equivalent to looking up a data element in a linked list, something we already know to be O(n) time. However, with a good hash function and a well created hash table, the chances of this happening are, for all intents and purposes, ignorable.Problem : The bigger the ratio between the size of the hash table and the number of data elements, the less chance there is for collision. What is a drawback to making the hash table big enough so the chances of collision is ignorable?
Wasted memory spaceProblem : How could a linked list and a hash table be combined to allow someone to run through the list from item to item while still maintaining the ability to access an individual element in O(1) time?
Create a hash table where the elements of the array are pointers to linked list objects. You have your linked list as normal, but when you add an element to the linked list, you also add a pointer to that element from the correct place in the hash table specified by the hash value of the data in the new linked list element.Problem : How could a hash table be used to implement a spell checker?
Create a hash table of all the words in the dictionary. When you encounter a word, whose spelling you want to check, just hash it and see if it exists in the table. If it does, then you've spelled it correctly. If not, then you haven't. This allows you to look up a word in O(1) time rather than O(n) time, which, in a dictionary on the order of 800,000 words, is a big time saver.Problem : How long would a deletion operation take from hash table implemented using separate chaining?
O(1). Lookup is O(1) and deleting from a linked list is O(1), so the total efficiency is O(1).Please wait while we process your payment