Problem 791 · Medium

Custom Sort String

Count the characters of s, emit them in the order of the custom string, then append the rest.

Open the interactive visualisation