## Help authour, Buy PDF Ebook
>>>**Click Here**<<<

## Data Structure Questions and Answers-Longest Common Subsequence

## Click on any option to know the CORRECT ANSWERS

Question 1 |

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

Recursion | |

Dynamic programming | |

Both recursion and dynamic programming | |

None of the mentioned |

**Reasoning Questions answers**

Question 1 Explanation:

Both recursion and dynamic programming can be used to solve the longest subsequence problem.

Question 2 |

Consider the strings "PQRSTPQRS" and "PRATPBRQRPS". What is the length of the longest common subsequence?

9 | |

8 | |

7 | |

6 |

**EVS Questions answers**

Question 2 Explanation:

The longest common subsequence is "PRTPQRS" and its length is 7.

Question 3 |

Which of the following problems can be solved using the longest subsequence problem?

Longest increasing subsequence | |

Longest palindromic subsequence | |

Longest bitonic subsequence | |

None of the mentioned |

**Current affairs Questions answers**

Question 3 Explanation:

To find the longest palindromic subsequence in a given string, reverse the given string and then find the longest common subsequence in the given string and the reversed string.

Question 4 |

Longest common subsequence is an example of .....

Greedy algorithm | |

2D dynamic programming | |

1D dynamic programming | |

Divide and conquer |

**Sociology Questions answers**

Question 4 Explanation:

Longest common subsequence is an example of 2D dynamic programming.

Question 5 |

What is the time complexity of the brute force algorithm used to find the longest common subsequence?

O(n) | |

O(n ^{2}) | |

O(n ^{3}) | |

O(2 ^{n}) |

**GK Questions answers**

Question 5 Explanation:

The time complexity of the brute force algorithm used to find the longest common subsequence is O(2

^{n}).

There are 5 questions to complete.