![]() In this case the next permutation would be the array in ascending order. Example 1: Input: s1 'ab', s2 'eidbaooo' Output: true Explanation: s2 contains one permutation of s1 ('ba'). In other words, return true if one of s1s permutations is the substring of s2. That is array is already in descending order. Can you solve this real interview question Permutation in String - Given two strings s1 and s2, return true if s2 contains a permutation of s1, or false otherwise.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |