Data Structures and Algorithms-I MCQs

Page No. 39

Collisions can be reduced by choosing a hash function randomly in a way that is independent of the keys that are actually to be stored.


aTrue


bFalse


cNone of the given options


deither true either false


View Answer True

What is the average retrieval time when n keys hash to the same slot?


aTheta(n)


bTheta(n2)


cTheta(nlog n)


dBig-Oh(n2)


View Answer Theta(n)

What is the value of h(k) for the key 123456?


a123


b456


c70


d67


View Answer 67

What is the table size when the value of p is 7 in multiplication method of creating hash functions?


a14


b128


c49


d127


View Answer 128

What is the advantage of the multiplication method?


aonly 2 steps are involved


busing constant


cvalue of m not critical


dsimple multiplication



What is the hash function used in multiplication method?


ah(k) = floor( m(kA mod 1))


bh(k) = ceil( m(kA mod 1))


ch(k) = floor(kA mod m)


dh(k) = ceil( kA mod m)



How many steps are involved in creating a hash function using a multiplication method?


a1


b4


c3


d2


View Answer 2

Using division method, in a given hash table of size 157, the key of value 172 be placed at position ____


a19


b72


c15


d17


View Answer 15

Which scheme provides good performance?


aopen addressing


buniversal hashing


chashing by division


dhashing by multiplication


View Answer universal hashing

What can be the value of m in the division method?


aAny prime number


bAny even number


c2p – 1


d2p


View Answer Any prime number

Goto Page No.

Page 39 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