McqMate

Q. |
## Consider the string “abbccbba”. What is the minimum number of insertions required to make the string a palindrome? |

A. | 0 |

B. | 1 |

C. | 2 |

D. | 3 |

Answer» A. 0 | |

Explanation: the given string is already a palindrome. so, no insertions are required. |

2.1k

0

Do you find this helpful?

12

View all MCQs in

Design and Analysis of AlgorithmsNo comments yet

- In the worst case, the minimum number of insertions to be made to convert the string into a palindrome is equal to the length of the string.
- Given a string, you have to find the minimum number of characters to be inserted in the string so that the string becomes a palindrome. Which of the following methods can be used to solve the problem?
- Which of the following problems can be used to solve the minimum number of insertions to form a palindrome problem?
- In which of the following cases the minimum no of insertions to form palindrome is maximum?
- Consider the matrices P, Q and R which are 10 x 20, 20 x 30 and 30 x 40 matrices respectively. What is the minimum number of multiplications required to multiply the three matrices?
- Consider the two strings “”(empty string) and “abcd”. What is the edit distance between the two strings?
- 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
- You are given infinite coins of N 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. What is the time complexity of a dynamic programming implementation used to solve the coin change problem?
- You are given infinite coins of denominations 1, 3, 4. What is the minimum number of coins required to achieve a sum of 7?
- Consider a undirected graph G with vertices { A, B, C, D, E}. In graph G, every edge has distinct weight. Edge CD is edge with minimum weight and edge AB is edge with maximum weight. Then, which of the following is false?