Skip to content

PakCss

Online Preparation Academy for CSS & PMS

  • itsmushii@gmail.com
  • Home
  • AI Mcqs
  • Computer
  • Verbal Reasoning
  • Pak Affairs
  • World Affairs
  • GK
  • Science
  • Pak Study
  • 4th Class to 10th Class
  • Islamic Study
  • English
  • Pedagogy
  • Software Engineering
  • PDF Mcqs
  • Quizzes

Category: Data Structures & Algorithm Mcqs

Data Structures & Algorithm Mcqs

Feb 03

What is the space complexity of the above recursive implementation to find the factorial of a number?

A. O(1)

B. O(n)

C. O(n2)

D. O(n3)

Mushtaq Ahmad MohmandLeave a commentData Structures & Algorithm Mcqs
Feb 03

Consider the 3×3 matrix {{2,1,-3},{6,3,4},{-2,3,0}}. What is the sum of the elements of the maximum sum rectangle?

A. 13

B. 16

C. 14

D. 19

Mushtaq Ahmad MohmandLeave a commentData Structures & Algorithm Mcqs
Feb 03

Longest palindromic subsequence is an example of ?

A. Greedy algorithm

B. 2D dynamic programming

C. 1D dynamic programming

D. Divide and conquer

Mushtaq Ahmad MohmandLeave a commentData Structures & Algorithm Mcqs
Feb 03

What is the time complexity of the above dynamic programming implementation of the longest common subsequence problem where length of one string is “m” and the length of the other string is “n”?

A. O(n)

B. O(m)

C. O(m + n)

D. O(mn)

Mushtaq Ahmad MohmandLeave a commentData Structures & Algorithm Mcqs
Feb 03

What is the space complexity of Kadane’s algorithm?

A. O(1)

B. O(n)

C. O(n2)

D. None of the mentioned

Mushtaq Ahmad MohmandLeave a commentData Structures & Algorithm Mcqs
Feb 03

You are given infinite coins of denominations 1, 3, 4. What is the total number of ways in which a sum of 7 can be achieved using these coins if the order of the coins is not important?

A. 4

B. 3

C. 5

D. 6

View Detail

Mushtaq Ahmad MohmandLeave a commentData Structures & Algorithm Mcqs
Feb 03

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

A. 0

B. 4

C. None of the mentioned

D. Cannot be determined

Mushtaq Ahmad MohmandLeave a commentData Structures & Algorithm Mcqs
Feb 03

There are 10 dice having 5 faces. The faces are numbered from 1 to 5. What is the number of ways in which a sum of 4 can be achieved?

A. 0

B. 2

C. 4

D. 8

View Detail

Mushtaq Ahmad MohmandLeave a commentData Structures & Algorithm Mcqs
Feb 03

Which problems should be solved using dynamic programming?

a) Mergesort
b) Binary search
c) Longest common subsequence
d) Quicksort

Mushtaq Ahmad MohmandLeave a commentData Structures & Algorithm Mcqs
Feb 03

Which problems is NOT solved using dynamic programming?

a) 0/1 knapsack problem
b) Matrix chain multiplication problem
c) Edit distance problem
d) Fractional knapsack problem

Mushtaq Ahmad MohmandLeave a commentData Structures & Algorithm Mcqs

Posts navigation

1 2 … 13 Next

Registeration

  • Register Yourself
  • Submit Mcqs
  • My Account

Science

  • Everyday Science
  • Biology
  • Physics
  • Chemistry
  • Mathematics

Pages

  • 4th Class to 10th Class
  • Contact Us
  • Login
  • My Account
  • Preparation Mcqs from Basic to Advance level
  • Privacy Policy
  • ReactJS
  • Register
  • Submit Mcqs
Scroll Up