Data Structures and Algorithms in Java Chapter 11- Hash Tables Test Bank Solution Manual Already Passed
0 view 0 purchase
Course
Data Structures and Algorithms in Java Chapter 11
Institution
Data Structures And Algorithms In Java Chapter 11
Data Structures and Algorithms in Java Chapter 11- Hash Tables Test Bank Solution Manual Already Passed
What is a hash table? - Answers A data structure that offers very fast insertion and searching.
How quick is a hash table? - Answers Insertion and searching taks close to constant time, 0(1) m...
Data Structures and Algorithms in Java Chapter 11- Hash Tables Test Bank Solution Manual Already
Passed
What is a hash table? - Answers A data structure that offers very fast insertion and searching.
How quick is a hash table? - Answers Insertion and searching taks close to constant time, 0(1) making it
essentially instantaneous.
What are the advantages to using a hash table? - Answers They are fast and relatively easy to program.
If you don't need to visit items in a specific order, and you can predict the size of your data base they are
unparalleled in speed and convenience.
What are the disadvantages to using a hash table? - Answers They are based on arrays which are difficult
to expand after they've been created. For some kinds of hash tables performance may degrade when a
table becomes too full, so the programmer should have an fairly accurate idea of how many data items
will need to be stored( or be prepared to periodically transfer data to a larger hash table which is time
consuming). There is no convenient way to visit items in a hash table in any kind of order(s/a smallest to
largest)
What is a symbol table? - Answers A symbol table is a data structure that associates a value with a key. It
It supports two primary operations: insert (put) a new pair into the table and search for (get) the value
associated with a given key. The symbol table holds all the variable and function names made up by the
programmer, along with the address where they can be found in memory.
What is the ASCII code? - Answers Its a way to represent individual characters as numbers. a is 97, b is
98, c is 99 and so on. It runs from 0 to 255 to accomodate capitals and punctuation.
In an ordinary multi-digit number, each digit-position represents a value: - Answers 10 times as big as
the position to it;s right. So 1234 really means 1*1000 + 2*100 + 3*10 + 4*1. ( OR writing the multipliers
as powers of 10 1*10^3 + 2*10^2 + 3*10^1 + 4*10^0
How would you convert the word "money" into a multi-digit number? - Answers 1. Convert each digit
into a number. I can use my own code instead of ASCII. So I would set a=1, b=2 and so on. I would set
blank = 0 to accomodate for for a space giving my 27 characters.
2. Next I would multiply wach number by the appropriate power of 27 and add the results.
This process generates a unique number for every potential word. An array can handle a number/word
this small.
What is the % operator in java? - Answers The modulo operator finds the remainder when one number
is divided by another.
What is a hash function? - Answers It hashes (converts) a number in a large range into a number in a
smaller range. The smaller range corresponds to the index numbers in an array.
The benefits of buying summaries with Stuvia:
Guaranteed quality through customer reviews
Stuvia customers have reviewed more than 700,000 summaries. This how you know that you are buying the best documents.
Quick and easy check-out
You can quickly pay through credit card or Stuvia-credit for the summaries. There is no membership needed.
Focus on what matters
Your fellow students write the study notes themselves, which is why the documents are always reliable and up-to-date. This ensures you quickly get to the core!
Frequently asked questions
What do I get when I buy this document?
You get a PDF, available immediately after your purchase. The purchased document is accessible anytime, anywhere and indefinitely through your profile.
Satisfaction guarantee: how does it work?
Our satisfaction guarantee ensures that you always find a study document that suits you well. You fill out a form, and our customer service team takes care of the rest.
Who am I buying these notes from?
Stuvia is a marketplace, so you are not buying this document from us, but from seller TutorJosh. Stuvia facilitates payment to the seller.
Will I be stuck with a subscription?
No, you only buy these notes for $8.29. You're not tied to anything after your purchase.