DSA Quiz 2

DSA Quiz 2

University

10 Qs

quiz-placeholder

Similar activities

UNIT-IV 2

UNIT-IV 2

University

15 Qs

CB3491 CRYPTOGRAPHY AND CYBER SECURITY

CB3491 CRYPTOGRAPHY AND CYBER SECURITY

University

10 Qs

DSA - Practice Quiz - 1

DSA - Practice Quiz - 1

University - Professional Development

15 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

HashTables

HashTables

University

8 Qs

Data Structure And Algorithm II

Data Structure And Algorithm II

University

15 Qs

Programacion 3 Examen final

Programacion 3 Examen final

1st Grade - 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?