Question 86
What is the load factor α of a hash table with m = 20 slots and n = 50 stored keys?
Load factor α = n / m = 50 / 20 = 2.5.
What is the load factor α of a hash table with m = 20 slots and n = 50 stored keys?
Load factor α = n / m = 50 / 20 = 2.5.
What is the average case time complexity of search, insertion, and deletion in an AVL Tree with N nodes?
An AVL tree is a strictly self-balancing binary search tree, guaranteeing O(log N) height and O(log N) search/insert/delete operations.
Evaluate the sum of values of all nodes in a BST constructed by inserting keys [15, 10, 20, 5]:
Keys in tree: 15, 10, 20, 5. Sum = 15 + 10 + 20 + 5 = 50.
What problem occurs in linear probing when multiple keys hash to nearby slots, creating long contiguous chains of occupied slots?
Primary clustering occurs in linear probing when consecutive occupied slots form large contiguous blocks, increasing average probe times.
How many NULL pointers exist in a standard Singly Linked List of N = 8 nodes?
In a singly linked list of N nodes, only the next pointer of the last node is NULL (1 NULL pointer).