Data Structure Questions and Answers – Longest Common Subsequence

This set of Data Structure Multiple Choice Questions & Answers (MCQs) focuses on “Longest Common Subsequence”. 1. Which of the following methods can be used to solve the longest common subsequence problem? a) Recursion b) Dynamic programming c) Both recursion and dynamic programming d) Greedy algorithm 2. Consider the strings “PQRSTPQRS” and “PRATPBRQRPS”. What is … Read more

advertisement

Data Structure Questions and Answers – Matrix-chain Multiplication

This set of Data Structure Multiple Choice Questions & Answers (MCQs) focuses on “Matrix-chain Multiplication”. 1. Which of the following methods can be used to solve the matrix chain multiplication problem? a) Dynamic programming b) Brute force c) Recursion d) Dynamic Programming, Brute force, Recursion 2. Which of the following is the recurrence relation for … Read more

advertisement

Data Structure Questions and Answers – 0/1 Knapsack Problem

This set of Data Structure Multiple Choice Questions & Answers (MCQs) focuses on “0/1 Knapsack Problem”. 1. The Knapsack problem is an example of ____________ a) Greedy algorithm b) 2D dynamic programming c) 1D dynamic programming d) Divide and conquer 2. Which of the following methods can be used to solve the Knapsack problem? a) … Read more

advertisement

Data Structure Questions and Answers – Minimum Number of Jumps

This set of Data Structure Multiple Choice Questions & Answers (MCQs) focuses on “Minimum Number of Jumps”. 1. You are given an array of elements where each array element represents the MAXIMUM number of jumps that can be made in the forward direction from that element. You have to find the minimum number of jumps … Read more

advertisement

Data Structure Questions and Answers – Rod Cutting

This set of Data Structure Multiple Choice Questions & Answers (MCQs) focuses on “Rod Cutting”. 1. Given a rod of length n and the selling prices of all pieces smaller than equal to n, find the most beneficial way of cutting the rod into smaller pieces. This problem is called the rod cutting problem. Which … Read more

advertisement

Data Structure Questions and Answers – Longest Increasing Subsequence

This set of Data Structure Multiple Choice Questions & Answers (MCQs) focuses on “Longest Increasing Subsequence”. 1. The longest increasing subsequence problem is a problem to find the length of a subsequence from a sequence of array elements such that the subsequence is sorted in increasing order and it’s length is maximum. This problem can … Read more

advertisement

Data Structure Questions and Answers – Kadane’s Algorithm

This set of Data Structure Multiple Choice Questions & Answers (MCQs) focuses on “Kadane’s Algorithm”. 1. Kadane’s algorithm is used to find ____________ a) Longest increasing subsequence b) Longest palindrome subsequence c) Maximum sub-array sum d) Longest decreasing subsequence 2. Kadane’s algorithm uses which of the following techniques? a) Divide and conquer b) Dynamic programming … Read more

advertisement

Data Structure Questions and Answers – Maximum Sum of Continuous Subarray – 2

This set of Data Structure MCQs focuses on “Maximum Sum of Continuous Subarray – 2”. 1. Which line should be inserted in the blank to complete the following dynamic programming implementation of the maximum sub-array sum problem? #include<stdio.h> int max_num(int a,int b) { if(a> b) return a; return b; } int maximum_subarray_sum(int *arr, int len) … Read more

advertisement

Data Structure Questions and Answers – Maximum Sum of Continuous Subarray – 1

This set of Data Structure Multiple Choice Questions & Answers (MCQs) focuses on “Maximum Sum of Continuous Subarray – 1”. 1. Given a one-dimensional array of integers, you have to find a sub-array with maximum sum. This is the maximum sub-array sum problem. Which of these methods can be used to solve the problem? a) … Read more

advertisement

Data Structure Questions and Answers – Coin Change Problem

This set of Data Structure Multiple Choice Questions & Answers (MCQs) focuses on “Coin Change Problem”. 1. You are given infinite coins of denominations v1, v2, v3,…..,vn and a sum S. The coin change problem is to find the minimum number of coins required to get the sum S. This problem can be solved using … Read more

advertisement
Subscribe to our Newsletters (Subject-wise). Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social networks below and stay updated with latest contests, videos, internships and jobs!

Youtube | Telegram | LinkedIn | Instagram | Facebook | Twitter | Pinterest
Manish Bhojasia - Founder & CTO at Sanfoundry
Manish Bhojasia, a technology veteran with 20+ years @ Cisco & Wipro, is Founder and CTO at Sanfoundry. He lives in Bangalore, and focuses on development of Linux Kernel, SAN Technologies, Advanced C, Data Structures & Alogrithms. Stay connected with him at LinkedIn.

Subscribe to his free Masterclasses at Youtube & discussions at Telegram SanfoundryClasses.