Evaluations — Input View

Evaluations for input

2 rows

Input
Output
Evaluation Input Image

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. Which one of the following choices gives a possible order in which the key values could have been inserted in the table?<image 1>



(A) 46, 42, 34, 52, 23, 33


(B) 34, 42, 23, 52, 33, 46


(C) 46, 34, 42, 23, 52, 33


(D) 42, 46, 33, 23, 34, 52


Answer with the option's letter from the given choices directly. No punctuation.


(A) 46, 42, 34, 52, 23, 33

Here's the possible order of key values in the hash table based on the given choices:

(A) In this option, 46 is the first key, followed by 42, then 34, 52, 23, and 33.

(B) In this option, 23 is the first key, followed by 42, then 34, 46, 33, and 52.

(C) In this option, 34 is the first key, followed by 46, then 42, 23, 52, and 33.

(D) In this option, 42 is the first key, followed by 34, then 46, 23, 33, and 52.


Expected Answer: C

Difficulty: Hard

Subfield: Data Structure and Algorithm

Evaluation Input Image

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. Which one of the following choices gives a possible order in which the key values could have been inserted in the table?<image 1>



(A) 46, 42, 34, 52, 23, 33


(B) 34, 42, 23, 52, 33, 46


(C) 46, 34, 42, 23, 52, 33


(D) 42, 46, 33, 23, 34, 52


Answer with the option's letter from the given choices directly. No punctuation.


C


Expected Answer: C

Difficulty: Hard

Subfield: Data Structure and Algorithm

Rows per page

Page 1 of 1

Input

Input ID
ae21851c-e021-46f4-b737-078c2340a629
Created
February 13, 2024
Permission
Public