McqMate

Q. |
## In which of the following cases the minimum no of insertions to form palindrome is maximum? |

A. | string of length one |

B. | string with all same characters |

C. | palindromic string |

D. | non palindromic string |

Answer» D. non palindromic string | |

Explanation: in string of length one, string with all same characters and a palindromic string the no of insertions is zero since the strings are already palindromes. to convert a non-palindromic string to a palindromic string, the minimum length of string to be added is 1 which is greater than all the other above cases. hence the minimum no of insertions to form palindrome is maximum in non-palindromic strings. |

1.4k

0

Do you find this helpful?

2

View all MCQs in

Design and Analysis of AlgorithmsNo comments yet

- Which of the following problems can be used to solve the minimum number of insertions to form a palindrome problem?
- 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.
- Consider the string “abbccbba”. What is the minimum number of insertions required to make the string a palindrome?
- 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?
- In which of the following cases, the maximum sum rectangle is the 2D matrix itself?
- 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?
- If all the weights of the graph are positive, then the minimum spanning tree of the graph is a minimum cost subgraph.
- Which of the following edges form minimum spanning tree on the graph using kruskals algorithm?
- Which graph has a size of minimum vertex cover equal to maximum matching?
- Which theorem gives the relation between the minimum vertex cover and maximum matching?