Given two strings, determine the common characters between them and return them in a list, maintaining the original order from the first string.
Explanation: The characters 'a', 'c', and 'e' are common to both strings and appear in that order in the first string.
Explanation: The characters 'l' and 'o' are the common characters between 'hello' and 'world', in the order they appear in 'hello'.
Analyze constraints and compute optimal solutions step-by-step.
No dry run loaded.
🚀 Practice this problem
Run code, get AI hints & track streak