Please Provide C++ Code for both parts. Part 1 We would like to use initials to locate an individual. For instance, MEL

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
correctanswer
Posts: 43759
Joined: Sat Aug 07, 2021 7:38 am

Please Provide C++ Code for both parts. Part 1 We would like to use initials to locate an individual. For instance, MEL

Post by correctanswer »

Please Provide C++ Code for both parts.
Part 1
We would like to use initials to locate an individual. For
instance, MEL should locate the person Mark E. Lehr. Note: this is
all upper case. Generate a hash function for the above using the
numbers on your telephone. You know, each letter has a number
associated with it, so examine your telephone keypad. Generate 512
random 3 letter initials and take statistics on a linked list array
size 512 to hold this information. Report how many have no
elements, 1 element, 2 elements, etc... Also, what is the maximum
number of collisions. Do both results agree with the hashing
statistics distribution? Show the comparison and analysis?
Part 2
Take problem 1 and put each of the 3 letters in a sorted binary
tree. Compare number of nodes to identify a match with the hash vs.
the tree. Use the AVL technique to balance the tree.
Register for solutions, replies, and use board search function. Answer Happy Forum is an archive of questions covering all technical subjects across the Internet.
Post Reply