Practice - 5 Tasks
Answer the questions below
1fill in blank
easyComplete the sentence to describe a hash map.
Data Structures Theory
A hash map stores data as key[1]value pairs.
Drag options to blanks, or click blank then click option'
Attempts:
3 left
π‘ Hint
Common Mistakes
Using 'and' or 'to' which do not represent the key-value relationship.
Confusing the connection symbol between key and value.
β Incorrect
A hash map stores data as key:value pairs, where each key maps to a value.
2fill in blank
mediumComplete the sentence to describe a hash set.
Data Structures Theory
A hash set stores only unique [1] without any associated values. Drag options to blanks, or click blank then click option'
Attempts:
3 left
π‘ Hint
Common Mistakes
Choosing 'values' which implies associated data, not correct for sets.
Choosing 'pairs' which applies to maps, not sets.
β Incorrect
A hash set stores only unique keys (or elements) without associated values.
3fill in blank
hardFix the error in the statement about hash maps.
Data Structures Theory
In a hash map, each [1] must be unique, but values can repeat. Drag options to blanks, or click blank then click option'
Attempts:
3 left
π‘ Hint
Common Mistakes
Confusing keys and values uniqueness.
Thinking values must be unique in a hash map.
β Incorrect
In a hash map, keys must be unique to identify values, but values can be duplicated.
4fill in blank
hardFill both blanks to compare hash map and hash set.
Data Structures Theory
A hash map stores [1] pairs, while a hash set stores only [2].
Drag options to blanks, or click blank then click option'
Attempts:
3 left
π‘ Hint
Common Mistakes
Mixing up keys and values for sets.
Using 'index-value' which is not related to hash sets or maps.
β Incorrect
A hash map stores key-value pairs, while a hash set stores only unique keys (elements).
5fill in blank
hardFill all three blanks to complete the differences between hash map and hash set.
Data Structures Theory
In a hash map, [1] are unique and map to [2], but in a hash set, only [3] are stored.
Drag options to blanks, or click blank then click option'
Attempts:
3 left
π‘ Hint
Common Mistakes
Confusing values with keys in sets.
Thinking sets store indexes.
β Incorrect
In a hash map, keys are unique and map to values, but in a hash set, only unique elements (keys) are stored without values.