Data Structures and Algorithms-I MCQs

Page No. 31

What is a time complexity for finding the longest prefix that is common between suffix in a string?


aƟ (n)

✖


bƟ (n!)

✖


cƟ (1)

✓


dO (log n!)

✖


View Answer Ɵ (1)

What is a time complexity for finding frequently occurring of a substring of minimum length in a string?


aƟ (n)

✓


bƟ (n!)

✖


cO (n2+ n1)

✖


dO (log n!)

✖


View Answer Ɵ (n)

What is a time complexity for finding the longest substring that is repeated in a string?


aO (log n!)

✖


bƟ (n!)

✖


cO (n2+ n1)

✖


dƟ (n)

✓


View Answer Ɵ (n)

What is a time complexity for finding the longest substring that is common in string S1 and S2 (n1 and n2 are the string lengths of strings s1, s2 respectively)?


aO (log n!)

✖


bƟ (n!)

✖


cO (n2+ n1)

✖


dƟ (n1 + n2)

✓


View Answer Ɵ (n1 + n2)

What is a time complexity for x pattern occurrence of length n?


aO (log n!)

✖


bƟ (n!)

✖


cO (n2)

✖


dƟ (n + x)

✓


View Answer Ɵ (n + x)

In simple chaining, what data structure is appropriate?


aSingly linked list

✖


bDoubly linked list

✓


cCircular linked list

✖


dBinary trees

✖


View Answer Doubly linked list

In simple uniform hashing, what is the search complexity?


aO(n)

✖


bO(logn)

✖


cO(nlogn)

✖


dO(1)

✓


View Answer O(1)

What is simple uniform hashing?


aEvery element has equal probability of hashing into any of the slots

✓


bA weighted probabilistic method is used to hash elements into the slots

✖


cElements has Random probability of hashing into array slots

✖


dElements are hashed based on priority

✖



What is the load factor?


aAverage array size

✖


bAverage key size

✖


cAverage chain length

✓


dAverage hash table length

✖


View Answer Average chain length

Which of the following is not a technique to avoid a collision?


aMake the hash function appear random

✖


bUse the chaining method

✖


cUse uniform hashing

✖


dIncreasing hash table size

✓



Goto Page No.

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