Data Structures and Algorithms-I MCQs

Page No. 32

What is a hash function?


aA function has allocated memory to keys

✖


bA function that computes the location of the key in the array

✓


cA function that creates an array

✖


dA function that computes the location of the values in the array

✖



If several elements are competing for the same bucket in the hash table, what is it called?


aDiffusion

✖


bReplication

✖


cCollision

✓


dDuplication

✖


View Answer Collision

What is a hash table?


aA structure that maps values to keys

✖


bA structure that maps keys to values

✓


cA structure used for storage

✖


dA structure used to implement stack and queue

✖



What is the worst case search time of a hashing using separate chaining algorithm?


aO(N log N)

✖


bO(N)

✓


cO(N2)

✖


dO(N3)

✖


View Answer O(N)

Which of the following is a disadvantage of using separate chaining using linked lists?


aIt requires many pointers

✓


bIt requires linked lists

✖


cIt uses array

✖


dIt does not resolve collision

✖



In hash tables, how many traversal of links does a successful search require?


a1+⅄

✖


b1+⅄2

✖


c1+ (⅄/2)

✓


d⅄3

✖


View Answer 1+ (⅄/2)

What is the correct notation for a load factor?


aΩ

✖


b∞

✖


c∑

✖


d⅄

✓


View Answer ⅄

Which of the following is the hashing function for separate chaining?


aH(x)=(hash(x)+f(i)) mod table size

✖


bH(x)=hash(x)+i2 mod table size

✖


cH(x)=x mod table size

✓


dH(x)=x mod (table size * 2)

✖


View Answer H(x)=x mod table size

Which of the following is identical to that of a separate chaining hash node?


aLinked list

✓


bArray

✖


cStack

✖


dQueue

✖


View Answer Linked list

Which of the following operations are done in a hash table?


aInsert only

✖


bSearch only

✖


cInsert and search

✓


dReplace

✖


View Answer Insert and search

Goto Page No.

Page 32 of 53

Alphabetical MCQs Categories
—

Here below You find all kind of categories of MCQs in alphabetical order.


"Comprehensive Collection of MCQs: Alphabetically Organized by Subject"
—

"Discover an extensive collection of multiple-choice questions (MCQs) neatly categorized by subject from A to Z. This resource is designed for anyone eager to explore various topics in a straightforward and organized manner. Whether you're a student preparing for exams, an educator seeking supplementary materials, or simply curious about different subjects, this compilation offers a convenient way to learn and assess your knowledge. With questions arranged alphabetically, navigation is effortless, allowing you to delve into subjects of interest at your own pace. Engage, learn, and expand your understanding with this accessible and comprehensive repository of MCQs!"


BolPakistan

bolpakistan.com.pk includes Job Mcqs and Pak Mcqs is the Top Largest Mcqs Forum in World, in which you can read Mcqs of All Subjects, PPSC test preparation, FPSC, NTS and PPSC PAST PAPERS, PPSC PAST MCQS. A Collection of Repeated MCQs for JOBs seekers.

Copyright © 2024, Designed & Developed by BolPakistan