B. A Structure That Maps Keys To Values: B. Size of Elements Stored in The Hash Table
B. A Structure That Maps Keys To Values: B. Size of Elements Stored in The Hash Table
There are several factors that affect the efficiency of lookup operations in a hash table. Which of the
following is not one of those factors?
E. All of the above factors affect the efficiency of hash table lookups
What are the two properties that make a binary tree a heap?
A hash table of length 10 uses open addressing with hash function h(k)=k mod 10, and linear probing.
After inserting 6 values into an empty hash table, the table is as shown below
0 1 2 3 4 5 6 7 8 9
42 23 34 52 46 33
Which one of the following choices gives a possible order in which the key values could have been
inserted in the table?
Consider a hash table of size seven, with starting index zero, and a hash function (3x + 4)mod7.
Assuming the hash table is initially empty, which of the following is the contents of the table when the
sequence 1, 3, 8, 10 is inserted into the table using closed hashing? Note that ‘_’ denotes an empty
location in the table.
A : 8, _, _, 1, 3, _, 10
B : 1, 8, 10, _, _, _, 3
C : 1, _, _, 8, 10, _,3
D : 1, 10, 8, _, _, _, 3
Given the following input (4322, 1334, 1471, 9679, 1989, 6171, 6173, 4199) and the hash function x mod
10, which of the following statements are true?
A : i only
B : ii only
C : i and ii only
D : iii or iv
1. A hash function takes a message of arbitrary length and generates a fixed length code.
2. A hash function takes a message of fixed length and generates a code of variable length.
3. A hash function may give the same hash value for distinct messages
A :I only
Which one of the following array elements represents a binary min heap?
12 10 8 25 14 17
8 10 12 25 14 17
25 17 14 12 10 8
14 17 25 10 12 8
What will be the position of 5, when a max heap is constructed on the input elements 5, 70, 45, 7,
12, 15, 13, 65, 30, 25?
5 will be at root
A. Priority queue
B. Stack
C. A decreasing order array
D. Normal Array
Construct a min heap from the following sequence of integer elements 120 140
40 50 80 70 60 90 20 100 After deleting a root element from the heap, what will
be the post order traversal of the heap?
140 90 100 50 80 40 120 60 70
140 100 90 80 50 40 120 60 70
If a node having two children is to be deleted from binary search tree, it is
replaced by its
a) In-order predecessor
b) In-order successor
c) Pre-order predecessor
d) None
A binary search tree is generated by inserting in order the following
integers:
50, 15, 62, 5, 20, 58, 91, 3, 8, 37, 60, 24
The number of the node in the left sub-tree and right sub-tree of the root,
respectively, is
a) (4, 7)
b) (7, 4)
c) (8, 3)
d) (3, 8)