Frequently Tested Exam Questions With
Verified Multiple Choice and Conceptual
Actual 100% Correct Detailed Answers
Guaranteed Pass!!Current Update!!
1. What is the goal of Hashing? - ANSWER Do faster than O(LogN) time
complexity for: lookup, insert, and remove operations. To achieve O(1)
2. What kind of Collection is Hashing? - ANSWER value-orientated.
3. How does Hashing work? - ANSWER 1. you have a key for the item.
2. the item's key gets churned within the hash function to form the Hash index.
3. The hash index can be applied to the data array, and so, the specific data is
found.
4. hash Table: - ANSWER An array that stores a collection of items.
5. Key - ANSWER Information in items that is used to determine where the
item goes into the table.
6. Hash Function - ANSWER A function that takes in the key to compute a
specific Hash Index.
,7. What would the Perfect Hash Function be? - ANSWER Each Key maps to
an unique Hash Index.
8. How do you delete a value within the hash table? - ANSWER You just set
Table[hash(Key)] = null
9. How do you look up a value within the hash table? - ANSWER return
Table[Hash(key)];
10.How do you insert a value within the hash table? - ANSWER
Table[Hash(key)]=data;
11.What is the worst case time complexity for: Insert, lookup, and delete, for
hash functions? - ANSWER O(1)
12.Collisions: - ANSWER When the Hash Function returns the same index
for different keys.
13.Collesion handeling: - ANSWER How you handle the collisions so each
element in the hittable stores only one item.
14.Idea of probing: - ANSWER If you have a collision, search somewhere
else on the table.
,15.Linear Probing: - ANSWER Step size is 1.
Find the index, and keep incrementing by one until you find a free space.
16.Quadratic Probing: - ANSWER Probe Sequence is (Hk+1)^2.
Minimizes clustering
better at distinguishing items across table.
17.data structure - ANSWER a particular scheme organizing related data
items.
18.linked list - ANSWER A sequence of zero or more nodes containing some
data and pointers to other nodes of the list.
19.list - ANSWER a collection of data items arranged in a certain linear
order
20.stack - ANSWER LIFO list in which insertions/deletions are only done at
one end.
21.queue - ANSWER FIFO list in which elements are added from one end of
the structure and deleted from the other end.
22.priority queue - ANSWER collection of data items from a totally ordered
universe
, 23.acyclic graph - ANSWER A graph with no cycles.
24.tree root - ANSWER top level vertex
25.siblings - ANSWER Vertices of a tree that have the same parent.
26.leaf - ANSWER A vertex with no children
27.parental - ANSWER A vertex with at least one child
28.height of a tree - ANSWER the length of the longest simple path from
the root to a leaf
29.ordered tree - ANSWER A rooted tree in which all children of each
vertex are ordered. (Usually left to right)
30.binary tree - ANSWER An ordered tree in which every vertex has no
more than two children, with each child designated as a left or right child.
Potentially empty.
31.binary search tree - ANSWER A binary tree with the property that for all
parent nodes, the left subtree contains only values less than the parent, and
the right subtree contains only values greater than the parent.