Pergunta de entrevista da empresa Apollo.io

You have two strings. Both strings are series of numbers. Implement a function to check whether the second string is a valid pop sequence of the first string. Ex. "12345" "32145" "12345" "54321" "12345" "21543"