Given two strings a and b, form a new string of length l, from these strings by combining the prefix of string a and suffix of string b.
Input : string a = remuneration string b = acquiesce length of pre/suffix(l) = 5 Output :remuniesce Input : adulation obstreperous 6 Output :adulatperous
1. Get first l letters from string a, and last l letters from string b.
2. Combine both results, and this will be resultant string.
Attention reader! Don’t stop learning now. Get hold of all the important DSA concepts with the DSA Self Paced Course at a student-friendly price and become industry ready.
- Print the longest prefix of the given string which is also the suffix of the same string
- Longest palindromic string formed by concatenation of prefix and suffix of a string
- Find the longest sub-string which is prefix, suffix and also present inside the string
- Find the longest sub-string which is prefix, suffix and also present inside the string | Set 2
- Check if suffix and prefix of a string are palindromes
- Longest Palindrome in a String formed by concatenating its prefix and suffix
- Find index i such that prefix of S1 and suffix of S2 till i form a palindrome when concatenated
- Longest string which is prefix string of at least two strings
- Longest prefix which is also suffix
- Sub-strings of a string that are prefix of the same string
- Find strings that end with a given suffix
- Strings from an array which are not prefix of any other string
- Count of binary strings of length N having equal count of 0's and 1's and count of 1's ≥ count of 0's in each prefix substring
- Construct an Array of Strings having Longest Common Prefix specified by the given Array
- Pair of strings having longest common prefix of maximum length in given array
- Length of longest common prefix possible by rearranging strings in a given array
- Longest string in an array which matches with prefix of the given string
- Meta Strings (Check if two strings can become same after a swap in one string)
- Count of distinct substrings of a string using Suffix Trie
- Count of distinct substrings of a string using Suffix Array
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.