Algorithm · Uber · Easy
Sort Clothing Sizes Easy · Topics · Company Tags · Hints Implement a function that takes a string sizes and returns a new string containing only the recognized size characters 'S', 'M', and 'L', arranged in nondecreasing order according to the ranking 'S' < 'M' < 'L'. Characters outside this set should be discarded. The result may be empty if none of the input characters are valid sizes. Example 1: Explanation: All characters are valid; after sorting they become S, M, M, L,…
Checking your access…