SN PLUS 3
SN PLUS 3

Suggestions

Use up and down arrows to review and enter to select.
  • Shakespeare dark gray
    • No Fear Shakespeare Translations
    • Shakespeare Study Guides
    • Shakespeare Life & Times
    • Glossary of Shakespeare Terms
  • Literature dark gray
    • No Fear Literature Translations
    • Literature Study Guides
    • Glossary of Literary Terms
    • How to Write Literary Analysis
  • Other Subjects dark gray
    • Biography
    • Biology
    • Chemistry
    • Computer Science
    • Drama
    • Economics
    • Film
    • Health
    • History
    • Math
    • Philosophy
    • Physics
    • Poetry
    • Psychology
    • Short Stories
    • Sociology
    • US Government and Politics
  • Test Prep PLUS dark gray
    • Test Prep Lessons
    • AP® English Literature
    • AP® English Language
  • Teacher dark gray
    • SparkTeach
    • Teacher's Handbook
  • Blog
My PLUS Dashboard
  • My PLUS Activity dark gray
    • Notes
    • Bookmarks
    • Test Prep PLUS
    • No Fear Translations & Audio
    • Mastery Quizzes
    • Flashcards
    • Infographics
    • No Fear Graphic Novels
  • Account Details
  • Subscription & Billing

Please wait while we process your payment

Reset Password

  • Please wait while we process your payment

    Log in Sign up

    Sparknotes

  • 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

    • Ad-free experience
    • Study notes
    • Flashcards
      & Quizzes
    • AP® English Test Prep
    • Plus much more

  • Already have an account? Log in

    Your Email

    Choose Your Plan

    BEST VALUE

    Save over 50% with a SparkNotes PLUS Annual Plan!

    Continuing to Payment will take you to astripe-imagepayment page

    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

  • We're sorry, SparkNotes Plus isn't available in your country.

  • Payment Details

    Payment Summary

    SparkNotes Plus

    You'll be billed after your free trial ends.

    7-Day Free Trial

    Not Applicable

    Renews April 9, 2023 April 2, 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

    Suggestions

    Use up and down arrows to review and enter to select.
    • My Account Icon My Account white
      • My PLUS Activity
        • Notes
        • Bookmarks
        • Test Prep PLUS
        • No Fear Translations
        • Mastery Quizzes
        • Flashcards
        • Infographics
        • No Fear Graphic Novels
      • Account Details
      • Subscription & Billing
      My PLUS Dashboard
    • Shakespeare white
      • No Fear Shakespeare Translations
      • Shakespeare Study Guides
      • Shakespeare Life & Times
      • Glossary of Shakespeare Terms
    • Literature white
      • No Fear Literature Translations
      • Literature Study Guides
      • Glossary of Literary Terms
      • How to Write Literary Analysis
    • Other Subjects white
      • Biography
      • Biology
      • Chemistry
      • Computer Science
      • Drama
      • Economics
      • Film
      • Health
      • History
      • Math
      • Philosophy
      • Physics
      • Poetry
      • Psychology
      • Short Stories
      • Sociology
      • US Government and Politics
    • Test Prep PLUS white
      • Test Prep Lessons
      • AP® English Literature
      • AP® English Language
    • Teacher white
      • SparkTeach
      • Teacher's Handbook
    • Blog
    • Help

    Please wait while we process your payment

    expired-logo

    Your PLUS subscription has expired

    • We’d love to have you back! Renew your subscription to regain access to all of our exclusive, ad-free study tools.
    Renew your subscription

    Please wait while we process your payment

    expired-logo

    snpromo-logo
    • Looking for exclusive, AD-FREE study tools? Look no further!

    Hash Tables

    Computer Science

    Study Guide
    • Study Guide
    • Topics
      • Introduction and Summary
      • What is a Hash Table?
      • Problems
      • Hash Functions
      • Problems
      • Coding up a Hash Table
      • Problems
      • Another use of hashing: Rabin-Karp string searching
      • Problems
    • Terms

    Please wait while we process your payment

    snplus-logo

    Unlock your FREE SparkNotes PLUS trial!

    Unlock your FREE Trial!

    Sign up and get instant access to bookmarks.
    • Ad-Free experience
    • Easy-to-access study notes
    • Flashcards & Quizzes
    • AP® English test prep
    • Plus much more
    Already have an account? Log in

    Terms

    Terms
    • Hash Table

      A data structure that uses a random access data structure, such as an array, and a mapping function, called a hash function, to allow for O(1) searches.

    • Array

      A set of items which are randomly accessible by numeric index; a very common data structure in computer science. See the arrays SparkNote.

    • Binary Search

      A technique for searching an ordered list in which we first check the middle item and -- based on that comparison -- "discard" half the data. The same procedure is then applied to the remaining half until a match is found or there are no more items left.

    • Efficiency

      The efficiency of an algorithm is the amount of resources it uses to find an answer. It is usually measured in terms of the abstract computations, such as comparisons or data moves, the memory used, the number of messages passed, the number of disk accesses, etc.

    • Sequential Search

      An algorithm for searching an array or list by checking items one at a time.

    • Data Structure

      An organization of information, usually in memory, for better algorithm efficiency, such as linked lists and arrays.

    • Hash Function

      Hashing is the process of running data through a hash function. A hash function is a mapping between a set of input values and a set of integers, known as hash values. A good hash function has the following properties: 1) The hash value is fully determined by the data being hashed. 2) The hash function uses all the input data. 3) The hash function "uniformly" distributes the data across the entire set of possible hash values. 4) The hash function generates very different hash values for similar strings. An example of a bad hash value that doesn't satisfy any of the above rules would be:

      int hash(char *data, int table_size) { return 220 % table_size; }
      An example of a relatively good hash function would be:
      int hash(char *data, int table_size) { int h, i; len = strlen(data); h=0; for (i=0; i<len; ++i) { h += data[i]; h += (h<<10); h ^= (h>>6); } h += (h<<3); h ^= (h>>11); h += (h<<15); return h % table_size; }

    • Collision

      A collision occurs when two data elements are hashed to the same value and try to occupy the same space in the hash table (in other words they collide). This is often solved by a linear or quadratic probing method or by separate chaining.

    • Linear Probing

      Linear probing is one method for dealing with collisions. If a data element hashes to a location in the table that is already occupied, the table is searched consecutively from that location until an open location is found.

    • Separate Chaining

      Separate chaining is a method for dealing with collisions. The hash table is an array of linked lists. Data elements that hash to the same value are stored in a linked list originating from the index equivalent of their hash value.

    • Linked List

      A list data structure made up of nodes, each of which holds a pointer to the next list element.

    Did you know you can highlight text to take a note? x

    Please wait while we process your payment

    snplus-logo

    Unlock your FREE SparkNotes PLUS trial!

    Unlock your FREE Trial!

    Sign up and get instant access to creating and saving your own notes as you read.
    • Ad-Free experience
    • Easy-to-access study notes
    • Flashcards & Quizzes
    • AP® English test prep
    • Plus much more
    Already have an account? Log in

    Take a Study Break

    • QUIZ: Is This a Taylor Swift Lyric or a Quote by Edgar Allan Poe?

    • The 7 Most Embarrassing Proposals in Literature

    • The 6 Best and Worst TV Show Adaptations of Books

    • QUIZ: Which Greek God Are You?

    Sign up for our latest news and updates!
    By entering your email address you agree to receive emails from SparkNotes and verify that you are over the age of 13. You can view our Privacy Policy here. Unsubscribe from our emails at any time.

    SparkNotes—the stress-free way to a better GPA

    • Quick Links
    • No Fear Shakespeare
    • Literature Guides
    • Other Subjects
    • Blog
    • Teacher’s Handbook
    • Premium Study Tools
    • SparkNotes PLUS
    • Sign Up
    • Log In
    • PLUS Help
    • More
    • Help
    • How to Cite SparkNotes
    • How to Write Literary Analysis
    • About
    • Contact Us

    Copyright © SparkNotes LLC

    • Terms of Use
    • |
    • Privacy
    • |
    • Cookie Policy
    • |
    • Do Not Sell My Personal Information