Data Structures Algorithms-II MCQs

Page No. 108

Which of the following methods can be used to solve the longest palindromic subsequence problem?


aDynamic programming

✖


bRecursion

✖


cBrute force

✖


dDynamic programming, Recursion, Brute force

✓



Consider the two strings “”(empty string) and “abcd”. What is the edit distance between the two strings?


a0

✖


b4

✓


c2

✖


d3

✖


View Answer 4

Consider the strings “monday” and “tuesday”. What is the edit distance between the two strings?


a3

✖


b4

✓


c5

✖


d6

✖


View Answer 4

Suppose each edit (insert, delete, replace) has a cost of one. Then, the maximum edit distance cost between the two strings is equal to the length of the larger string.


aTrue

✓


bFalse

✖


ceither A. or (b)

✖


d None of these

✖


View Answer True

In which of the following cases will the edit distance between two strings be zero?


aWhen one string is a substring of another

✖


bWhen the lengths of the two strings are equal

✖


cWhen the two strings are equal

✓


dThe edit distance can never be zero

✖



Which of the following is an application of the edit distance problem?


aApproximate string matching

✖


bSpelling correction

✖


cSimilarity of DNA

✖


dApproximate string matching, Spelling Correction and Similarity of DNA

✓



The edit distance satisfies the axioms of a metric when the costs are non-negative.


aTrue

✓


bFalse

✖


cA & B

✖


d None of these

✖


View Answer True

Which of the following methods can be used to solve the edit distance problem?


aRecursion

✖


bDynamic programming

✖


cBoth dynamic programming and recursion

✓


dGreedy Algorithm

✖



What is the space complexity of the above implementation of Wagner–Fischer algorithm where “m” and “n” are the lengths of the two strings?


aO(1)

✖


bO(n+m)

✖


cO(mn)

✓


dO(nlogm)

✖


View Answer O(mn)

What is the time complexity of the Wagner–Fischer algorithm where “m” and “n” are the lengths of the two strings?


aO(1)

✖


bO(n+m)

✖


cO(mn)

✓


dO(nlogm)

✖


View Answer O(mn)

Goto Page No.

Page 108 of 149

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