DSA Quiz 2

DSA Quiz 2

University

10 Qs

quiz-placeholder

Similar activities

DBMS - Hash Indexing

DBMS - Hash Indexing

University

10 Qs

06 - Hashing #2

06 - Hashing #2

University

15 Qs

Seatwork HASH (Data Structure)

Seatwork HASH (Data Structure)

University

10 Qs

Quiz No. 2.2 Hash Tables

Quiz No. 2.2 Hash Tables

University

12 Qs

B+/Hashing Review

B+/Hashing Review

University

13 Qs

Hashing

Hashing

University

10 Qs

Authentication Quiz

Authentication Quiz

11th Grade - University

15 Qs

DSA Quiz 4 Set 1

DSA Quiz 4 Set 1

University

10 Qs

DSA Quiz 2

DSA Quiz 2

Assessment

Quiz

Computers

University

Medium

Created by

Arikumar K S

Used 4+ times

FREE Resource

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Consider a hash table of size seven, with starting index zero, and a hash function (7x+3) mod 4. Assuming the hash table is initially empty, which of the following is the contents of the table when the sequence 1, 3, 8, 10 is inserted into the table using closed hashing ? Here “__” denotes an empty location in the table.
3, 10, 1, 8, __ , __ , __
1, 3, 8, 10, __ , __ , __
1, __ , 3, __ , 8, __ , 10
3, 10, __ , __ , 8, __ , __

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the worst case complexity for linear search?
O(nlogn)
O(logn)
O(n)
O(1)

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the time complexity of binary search with iteration?
O(nlogn)
O(n)
O(1)
O(logn)

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Given an array arr = {45,77,89,90,94,99,100} and key = 100; What are the mid values(corresponding array elements) generated in the first and second iterations using binary search?
90 and 99
89 and 94
90 and 100
94 and 99

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

The case in which a key other than the desired one is kept at the identified location is called?
Hashing
Chaining
Open addressing
Collision

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media 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 above. Which one of the following choices gives a possible order in which the key values could have been inserted in the table?
46, 42, 34, 52, 23, 33
34, 42, 23, 52, 33, 46
42, 46, 33, 23, 34, 52
46, 34, 42, 23, 52, 33

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the worst case search time of a hashing using separate chaining algorithm?
O(N log N)
O(N^2)
O(N^3)
O(N)

Create a free account and access millions of resources

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?