Description
- to implement searching and hashing, and to understand their performance.
Requirements • Download the the text Aile magicitems.txt from our web site if you and Notes don’t have it already.
- Read it line by line into an
- Sort the array using one of your sort implementations from Assignment (Include a copy of your sorting code in this assignment’s directory so that it’s easy to compile.)
- Develop your own implementation of linear and binary [60 points]
- Randomly select 42
- Perform a linear search on the (sorted) array for each of those randomly selected Print the number of comparisons for each search and compute the overall average.
- Perform a binary search on the (sorted) array for the same “randomly” selected items as Print the number of comparisons for each search and compute the overall average.
- Record your results in a table in your LaTeX Also note the asymptotic running time of each sort and explain why it is that way.
- Develop your own implementation of a hash table (with chaining) of [30 points] size Use the hash function we spoke about in class (and in the example code on our web site at https://www.labouseur.com/courses/ algorithms/Hashing.java.html).
- Load your hash table with the magic
- Retrieve the same 42 (no longer-) randomly selected items from your hash Print the number of (get + comparisons) for each item and compute the overall average. (Every get is one, then count the comparisons needed to handle chaining.)
- Add your results to the LaTeX document, including the asymptotic [10 points] running time of hashing with chaining and explain why it is that way.
As usual, your code must separate structure from presentation, be professionally formatted yet uniquely yours (show some personality), use and demonstrate best practices, and make me proud to be your teacher. Resources • Linear and binary search are described in our text in sections 10.2 and 27.3.
- Hash tables with chaining are described in our text in section 2.
Submi5ng In addition to your source code, commit your LaTeX document in both .tex and .pdf forms
Your Work to your GitHub repository.



