HackWithInfy Mapping Concepts Quiz-2

Question 1

Time: 00:00:00
What is direct mapping in data structures ?

it means maps each block of main memory into only one possible cache line

it means maps each block of main memory into only one possible cache line

 it is a collection of values

 it is a collection of values

 It stores data in the form of key and value pairs where every key is unique

 It stores data in the form of key and value pairs where every key is unique

All mentioned

All mentioned

Once you attempt the question then PrepInsta explanation will be displayed.

Please login to submit your explanation

Start

Question 2

Time: 00:00:00
The data type of the map has a number of methods that allow data?

inserted and deleted

inserted and deleted

searched

searched

 retrieve 

 retrieve 

 All the above

 All the above

Once you attempt the question then PrepInsta explanation will be displayed.

Please login to submit your explanation

Start

Question 3

Time: 00:00:00
What is the size of a cache block of TAG field in direct mapping?

 

6 bytes

6 bytes

4 bytes

4 bytes

16 bytes

16 bytes

32 bytes

32 bytes

Once you attempt the question then PrepInsta explanation will be displayed.

Please login to submit your explanation

Start

Question 4

Time: 00:00:00
The strategy of searching for a block by moving all the tags is?

 Hash search

 Hash search

Mapping search

Mapping search

Associative search

Associative search

Linear search  

Linear search  

Once you attempt the question then PrepInsta explanation will be displayed.

Please login to submit your explanation

Start

Question 5

Time: 00:00:00
Which is the complexity of the search in hash search ?

O(1)

O(1)

 O(n)

 O(n)

O(nlogn)

O(nlogn)

O(logn)

O(logn)

Once you attempt the question then PrepInsta explanation will be displayed.

Please login to submit your explanation

Start

Question 6

Time: 00:00:00
What methods can be used to prevent a collision in Hashing?

Use uniform hashing

Use uniform hashing

 Make the hash function appear random

 Make the hash function appear random

Use the chaining method

Use the chaining method

All the above  

All the above  

Once you attempt the question then PrepInsta explanation will be displayed.

Please login to submit your explanation

Start

Question 7

Time: 00:00:00
The hashing strategy which assigns a fixed number of buckets is defined as -

 internal hashing

 internal hashing

external hashing

external hashing

static hashing

static hashing

 dynamic hashing

 dynamic hashing

Once you attempt the question then PrepInsta explanation will be displayed.

Please login to submit your explanation

Start

Question 8

Time: 00:00:00
Imagine a size seven hash table with start index zero, and a hash function (5x + 2)mod7. Assuming that the hash table is initially empty, which of the following is the table content when the sequence 1, 3, 8,10 is inserted into the table using closed hazing? Note that a '-- ' in the table denotes an empty place.

1 -  8 - 10 3 - 

1 -  8 - 10 3 - 

1 8 10 3 - - -

1 8 10 3 - - -

 1 -  8 - 10 - 3 

 1 -  8 - 10 - 3 

1 - - - 8 10 3 

1 - - - 8 10 3 

Once you attempt the question then PrepInsta explanation will be displayed.

Please login to submit your explanation

Start

Question 9

Time: 00:00:00
 In linear hashing, formula used to determine number of records if blocking factor, load factor and buckets of files are defined as -

r =l + bfr + N

r =l + bfr + N

r =l + bfr * N

r =l + bfr * N

 r =l * bfr * N

 r =l * bfr * N

 r =l + bfr - N

 r =l + bfr - N

Once you attempt the question then PrepInsta explanation will be displayed.

Please login to submit your explanation

Start

Question 10

Time: 00:00:00
The load factor α(alpha) for T is given by a hash table (T) with 30 slots that stores 15000 elements?

 

500

500

1500

1500

 00.15

 00.15

15.250

15.250

Once you attempt the question then PrepInsta explanation will be displayed.

Please login to submit your explanation

Start

["0","40","60","80","100"]
["Need more practice!","Keep trying!","Not bad!","Good work!","Perfect!"]