title
At a job interview, you are challenged to write an algorithm to check if a given string, s, can be formed from two other strings, part1 and part2.
The restriction is that the characters in part1 and part2 are in the same order as in s.
The interviewer gives you the following example and tells you to figure out the rest from the given test cases.
example
1 | 'codewars' is a merge from 'cdw' and 'oears': |
My solution
1 | function isMerge(s, part1, part2) { |
good solution
1 | function isMerge(s, part1, part2) { |