Question: Asap Hashing (50 points) Create a method hashSetExe to use Java HashSet to store elenients and prnt th elements: Apple. Mango, and Grapes Please stale
Hashing (50 points) Create a method hashSetExe to use Java HashSet to store elenients and prnt th elements: "Apple". "Mango", and "Grapes" Please stale whos te utput would be when printing the HashSet with the three elements ) Create a method treeSetExe to use Java TreeSet to store elements and print them eiample, input the elements "Apple", "Mango", and"Grapes" Please state wh output woold be when printing the TreeSet with the three elements. (20) th c Create a hashing function that takes the string, calculate the sum of the ASCll code ofech character, and return (sum%tableSize) ns theindex. For example, hash("ab". I i) renns 8. becase "a, is 97 and "b, is 98, which adis up to 195, and 195% 11 returns (10) 3. Tree (S0 points) a. Define a class called TreeNode containing three data fields: element, lef and righ The a class called BinaryTree containing two data fields: root and numberEletnent element is a generic type. Create constructors, setters and getters as approptiate e Define a method balanceCheck to check if a tree is balanced. A tree being balanced cs d. Define a method findElement to find out if a tree includes a certain elenient. (10) Create constructors, setters and getters as appropriate. (15) that the balance factor is-1,0, or 1. (10) s public c class Linked Somethiy C
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
