Which of the following statements about quicksort is TRUE?
Consider the following undirected graph:
If we perform Breadth-First Search (BFS) traversal starting from node 3, how many of the following traversal(s) is/are possible?
3 → 2 → 4 → 6 → 7 → 1 → 8 → 53 → 4 → 2 → 6 → 7 → 8 → 1 → 53 → 7 → 4 → 6 → 2 → 5 → 1 → 83 → 2 → 6 → 1 → 4 → 7 → 8 → 53 → 2 → 8 → 1 → 6 → 5 → 4 → 73 → 4 → 6 → 2 → 8 → 1 → 5 → 7
Suppose you inserted the keys 1, 3, 4, 7, 12, 14, 16, 17, 30, 39 (exactly in this order) into a hash table of size 13 using the hash function:
h(x)=(3x+5) mod 13 also insert key 27 and 43 after that
using chaining for collision resolution.According to the discussion in our lectures, which of the following represents a complete linked list as it appears in the resulting hash table (with the leftmost element as the head)?
What is the running time of the above pseudocode in Θ notation?
Consider a double hashing scheme in which the primary hash function is:
h1(k) = k mod 13
and the secondary hash function is:
h2(k) = 1+(k mod 5)
Assume that the table size is 13.
Find the address returned by probe 2 in the probe sequence for the key value k=20. Assume that the probe sequence begins at probe 0.
Implement the Boolean functionform a truth table, implement it using an 8-to-1 multiplexer, and choose the correct answer.
For the circuit shown below (implemented using a 2-to-4 line decoder with enable and an OR gate), find the expression for the output function and implement it using 2-input NOR gates and choose the right answer.
Simplify the Boolean expression:F = B(\overline{AB}+CD) + AB.
Perform the following binary subtraction:
11001 - 10111
What is the correct result of the subtraction?