Given a string A and a dictionary of n words B, find out if A can be segmented into a space-separated sequence of dictionary words.
Note: From the dictionary B each word can be taken any number of times and in any order.
Given a string A and a dictionary of n words B, find out if A can be segmented into a space-separated sequence of dictionary words.
Note: From the dictionary B each word can be taken any number of times and in any order.
Given a string, find the minimum number of characters to be inserted to convert it to palindrome.
For Example:
- ab: Number of insertions required is 1. bab or aba
- aa: Number of insertions required is 0. aa
- abcd: Number of insertions required is 3. dcbabcd
Given an array of integers and another number. Find all the unique quadruple from the given array that sums up to the given number.