English, asked by gajrajgurjar2016, 9 months ago

Chef has a string S. He also has another string P, called pattern. He wants to find the pattern in S, but that might be impossible. Therefore, he is willing to reorder the characters of S in such a way that P occurs in the resulting string (an anagram of S) as a substring.

Since this problem was too hard for Chef, he decided to ask you, his genius friend, for help. Can you find the lexicographically smallest anagram of S that contains P as substring?

Note: A string B is a substring of a string A if B can be obtained from A by deleting several (possibly none or all) characters from the beginning and several (possibly none or all) characters from the end.

Answers

Answered by deepshikha5283
0

Answer:

stick sign so xl stop xl xl E-TOP WP app WP so do all xl xl so WP so do xl xl do so stop E-TOP WP WP stop Ato so do xl xl xl xl NM do so stop stopavailable Thanksgiving Duncan Munoz CT bysign

Similar questions