- Computer Science Engineering (CSE)
- Design and Analysis of Algorithms
- Given a string, you have to find the min...

Q. |
## 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? |

A. | greedy algorithm |

B. | recursion |

C. | dynamic programming |

D. | both recursion and dynamic programming |

Answer» D. both recursion and dynamic programming | |

Explanation: dynamic programming and recursion can be used to solve the problem. |

View all MCQs in:
Design and Analysis of Algorithms

- You are given n dice each having f faces. You have to find the number of ways in which a sum of S can be achieved. This is the dice throw problem. Which of the following methods can be used to solve the dice throw problem?
- Which of the following problems can be used to solve the minimum number of insertions to form a palindrome problem?
- 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 of these methods can be used to solve the rod cutting problem?
- 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?
- 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 an array, check if the array can be divided into two subsets such that the sum of elements of the two subsets is equal. This is the balanced partition problem. Which of the following methods can be used to solve the balanced partition problem?
- Given a 2D matrix, find a submatrix that has the maximum sum. Which of the following methods can be used to solve this problem?
- 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
- In which of the following cases the minimum no of insertions to form palindrome is maximum?

Login to Continue

It will take less than 2 minutes

Report MCQ