8. Let's look at the actions of HashSet. Assume the following: the hash table array has an initial capacity of 10 the ha
Posted: Sat May 14, 2022 4:29 pm
8. Let's look at the actions of HashSet. Assume the following: the hash table array has an initial capacity of 10 the hash table uses chaining for resolving collisions • the hash function returns the integer key's value, mod the size of the table, i.e., h(i) = i % 10 • rehashing occurs at the end of an add where the load factor is 2 0.5 and doubles the capacity of the hash table Draw an array diagram to show the final state of the hash table after the following operations are performed. Leave a box empty if an array element is null or is unused. You do not have to redraw an entirely new hash table after each element is added or removed, but since the final answer depends on every add/remove being done correctly, you may wish to redraw the table at various important stages. YOU MUST SHOW ALL WORK FOR FULL CREDIT. Set<Integer> set = new HashSet(); set.add(47); set.add(97); set.add(52); set.add(-34); set.remove(4); set.remove(52); set.add(44); set.add(77); set.add(-232); set.add(-4); set.add(444); Size Capacity Load factor
9. Write a complete adjacency matrix, sparse matrix, adjacency list, incidence matrix representation of the digraph below. 12 4 151 adjacency matrix sparse matrix adjacency list incidence matrix
9. Write a complete adjacency matrix, sparse matrix, adjacency list, incidence matrix representation of the digraph below. 12 4 151 adjacency matrix sparse matrix adjacency list incidence matrix