question archive One percentage point Final Extra Credit for each correct answer

One percentage point Final Extra Credit for each correct answer

Subject:Computer SciencePrice:18.89 Bought3

One percentage point Final Extra Credit for each correct answer. No lates accepted. 1. Consider inserting data with integer keys 8, 2, 9, 1, 5 in that order into a hash table of size 7 where the hashing function is h(key) % 7. Show a separate chaining hash table after doing the insertions. What is ? after inserting the numbers? Show an example of inserting N more values which would lead to a ? in which you should rehash to a larger table. Choose the smallest N total values which would cause ? to be high enough to rehash. 2. AVL Tree 5 2 6 4 7 If you were to add a single new node to this tree… … What range of values can you add to get a left-left rotation (if no new node could cause this, then say none)? … What range of values can you add to get a left-right rotation (if no new node could cause this, then say none)? … What range of values can you add to get a right-left rotation (if no new node could cause this, then say none)? 3. Graphs Adjacency List and Matrix Write Java code to create an Adjacency Matrix M to represent the graph above. Write Java code to create an Adjacency List L to represent the graph above. 4. Topological Sort What is the topological sort of the graph above? Show the process with the removed, in-degree, and zero degree tables as we did in class. How many possibilities are there to select the first node in the topological sort above? 5. In the buildHeap() method shown below, why does it start the loop at currentSize/2? Would the final heap created be correct (ie. Heap order and complete tree) if it started at node 1 until currentSize to call percolateDown? private void buildHeap() { for (int i = currentSize/2; i > 0; i--) percolateDown(i); } } { 6. Write pseudocode (as close to Java as possible) to return the number of nodes in a BST. Your method will return an int given the root node of a BST. 7. Does the graph above have a topological sort? Explain why or why not? If you answered it does not, remove the MINIMUM number of edges from the graph necessary for there to be topological sort. 8. Show the order of nodes visited during a BFS traversal of the graph below, with start node 0.

Option 1

Low Cost Option
Download this past answer in few clicks

18.89 USD

PURCHASE SOLUTION

Option 2

Custom new solution created by our subject matter experts

GET A QUOTE

rated 5 stars

Purchased 3 times

Completion Status 100%

Related Questions