5 kyu

Merged String Checker

1,622 of 9,441Abbe

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 Trained44631
Total Skips10686
Total Code Submissions273369
Total Times Completed9441
Java Completions1622
Clojure Completions128
JavaScript Completions2693
CoffeeScript Completions28
Python Completions2993
C# Completions1146
Haskell Completions434
PHP Completions185
COBOL Completions5
C Completions149
C++ Completions272
Total Stars1424
% of votes with a positive feedback rating82% of 1205
Total "Very Satisfied" Votes867
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