Menu

(Solved) : Consider Following Hash Table Hash Function H K K 17 Index0 234567891011 12131415 16 Data Q32563128 . . .

Consider the following hash table, with the hash function h(k) = k%17 Index0 234567891011 12131415 16 Data 17 1219 2122620 18 269 42 13 16 a. What table locations would be accessed when searching for 18 using linear probing? b. What table locations would be accessed when searching for 7 using linear probing? c. What table locations would be accessed when searching for 18 using double hashing, with ho(k) 1 + K%5? linear probing or double hashing (assuming the same data was inserted)? element as the pivot, for the input 3 0 75 261 4 down merge sort for the input above. elements are sorted) for the input above ation algorithm where there are no edges between the two nodes; each row represents the edges from d. Which of the first 5 table locations would be empty if chaining was used rather than e. Show the output of the partition algorithm (from quicksort), using the leftmost f. Show the two inputs and the output of the last merge operation performed in top g. Show the result of the fourth phase of selection sort (when the first four output h. Show the max heap created from the input above using the bottom-up heap cre- i. Draw the weighted directed graph represented by the following matrix (oo is used a particular node A B C D E 100 1 оооооо j. Which vertices form a cycle in the above graph? k. If E (and the associated edges) was removed from the graph above, what are the possible outputs of topological sorting? minimum spanning tree using Prims algorithm, starting at A? minimum spanning tree using Kruskals algorithm? 1. Ignoring the direction of edges, what is the order in which edges are added to the m. Ignoring the direction of edges, what is the order in which edges are added to the

Consider the following hash table, with the hash function h(k) = k%17 Index0 234567891011 12131415 16 Data 17 1219 2122620 18 269 42 13 16 a. What table locations would be accessed when searching for 18 using linear probing? b. What table locations would be accessed when searching for 7 using linear probing? c. What table locations would be accessed when searching for 18 using double hashing, with ho(k) 1 + K%5? linear probing or double hashing (assuming the same data was inserted)? element as the pivot, for the input 3 0 75 261 4 down merge sort for the input above. elements are sorted) for the input above ation algorithm where there are no edges between the two nodes; each row represents the edges from d. Which of the first 5 table locations would be empty if chaining was used rather than e. Show the output of the partition algorithm (from quicksort), using the leftmost f. Show the two inputs and the output of the last merge operation performed in top g. Show the result of the fourth phase of selection sort (when the first four output h. Show the max heap created from the input above using the “bottom-up” heap cre- i. Draw the weighted directed graph represented by the following matrix (oo is used a particular node A B C D E 100 1 оооооо j. Which vertices form a cycle in the above graph? k. If E (and the associated edges) was removed from the graph above, what are the possible outputs of topological sorting? minimum spanning tree using Prim’s algorithm, starting at A? minimum spanning tree using Kruskal’s algorithm? 1. Ignoring the direction of edges, what is the order in which edges are added to the m. Ignoring the direction of edges, what is the order in which edges are added to the Show transcribed image text

Expert Answer


Answer to Consider Following Hash Table Hash Function H K K 17 Index0 234567891011 12131415 16 Data Q32563128 . . .

OR