Data Structures Algorithms-II MCQs

Page No. 109

For which of the following pairs of strings is the edit distance maximum?


asunday & monday


bmonday & tuesday


ctuesday & wednesday


dwednesday & thursday


View Answer wednesday & thursday

What is the edit distance between the strings “abcd” and “acbd” when the allowed operations are insertion, deletion and substitution?


a1


b2


c3


d4


View Answer 2

Wagner–Fischer algorithm is used to find ____________


aLongest common subsequence


bLongest increasing subsequence


cEdit distance between two strings


dLongest decreasing subsequence



Wagner–Fischer is a ____________ algorithm.


aBrute force


bGreedy


cDynamic programming


dRecursive


View Answer Dynamic programming

Which of the following implementations of Catalan numbers has the largest space complexity(Don’t consider the stack space)?


aDynamic programming


bBinomial coefficients


cRecursion


dAll have equal space complexities


View Answer Dynamic programming

Which of the following implementations of Catalan numbers has the smallest time complexity?


aDynamic programming


bBinomial coefficients


cRecursion


dAll have equal time complexity


View Answer Binomial coefficients

Which of the following lines completes the above code?


a arr[i] = arr[j] * arr[k];


barr[j] += arr[i] * arr[k];


carr[i] += arr[j] * arr[k].


darr[j] = arr[i] * arr[k];



Which of the following methods can be used to find the nth Catalan number?


aRecursion


bBinomial coefficients


cDynamic programming


dRecursion, Binomial Coefficients, Dynamic programming



Which of the following is not an application of Catalan Numbers?


aCounting the number of Dyck words


bCounting the number of expressions containing n pairs of parenthesis


c Counting the number of ways in which a convex polygon can be cut into triangles by connecting vertices with straight lines


dCreation of head and tail for a given number of tosses



Which of the following numbers is the 6th Catalan number?


a14


b429


c132


d42


View Answer 42

Goto Page No.

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