**AMAIZING OFFER GET 25% OFF YOUR FIRST ORDER** CODE FIRST25

What to SubmitPlease prepare a PDF file to include your answers to each question. Please also prepareONE ha6.py file to include all your codes (if applicable) – clearly comment the correspondingquestions.How to SubmitSubmit your PDF file and ha6.py file using the Canvas.The goal of this collection of assignment is to help you review (i) maps; (ii) search tree; (iii)sorting.*The first two questions require you to provide drawings. You might manually draw and uploada photograph of your drawings; or directly draw your answers using PowerPoint. Either way,include pictures of your drawings in your PDF file.1. Draw the 9-entry hash table that results from using the hash function, h(i) = (i+1) mod 10, tohash the keys 2, 3, 24, 12, 13, 23, 11, 20, and 5, assuming collisions are handled by chaining. Asample drawing can be found in the page 30 of Lecture 9, e.g.,2. The data structure for Binary search tree includes three major operations: search, insert, anddelete. With an empty binary search tree, insert entries with keys 30, 35, 29, 60, 44, 22 (in thisorder). Draw the binary search tree after each insertion.3. Suppose a n-element sequence S is used to store votes for president candidates. Each elementof S is an integer (ID) representing a particular candidate. E.g., S=[10, 874, 10, 874, 92, 384,92, …]. Every candidate has a UNIQUE ID. The number of candidates is UNKNOWN and thuseach ID might be arbitrarily large. The number of votes n is also not given and the sequencecould be arbitrarily large. Please Design and Develop a Python function of time-complexityO(nLogn) that takes S as its argument and return the candidate’s ID who won the election.(Tips: you might sort the sequence first using an O(nlogn) sorting method and then cast thevotes).——————————————————————————————————————————————I attached the pdf below, please follow the instructions. They are only 3 questions, I have to submit ONE .pdf & .py !

.doc file

## Recent Comments