5 kyu

Merged String Checker

1,628 of 9,497Abbe

Description:

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 should be 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.

For example:

'codewars' is a merge from 'cdw' and 'oears':

    s:  c o d e w a r s   = codewars
part1:  c   d   w         = cdw
part2:    o   e   a r s   = oears
Strings
Algorithms

Stats:

CreatedJan 29, 2015
PublishedMay 25, 2015
Warriors Trained44811
Total Skips10705
Total Code Submissions274118
Total Times Completed9497
Java Completions1628
Clojure Completions128
JavaScript Completions2706
CoffeeScript Completions28
Python Completions3011
C# Completions1152
Haskell Completions434
PHP Completions187
COBOL Completions5
C Completions152
C++ Completions283
Total Stars1428
% of votes with a positive feedback rating82% of 1206
Total "Very Satisfied" Votes868
Total "Somewhat Satisfied" Votes240
Total "Not Satisfied" Votes98
Ad
Contributors
  • Abbe Avatar
  • jhoffner Avatar
  • bkaes Avatar
  • MMMAAANNN Avatar
  • bstenzel Avatar
  • JohanWiltink Avatar
  • Voile Avatar
  • hobovsky Avatar
  • trashy_incel Avatar
  • MikChan Avatar
  • akar-0 Avatar
  • iming Avatar
  • sid114 Avatar
Ad