![]() |
VOOZH | about |
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.
Examples :
Input : string a = remuneration string b = acquiesce length of pre/suffix(l) = 5 Output :remuniesce Input : adulation obstreperous 6 Output :adulatperous
Approach :
Implementation:
remuniesce
Time Complexity: O(n + m), where n and m are the lengths of the given string.
Auxiliary Space: O(n + m), where n and m are the lengths of the given string.