about | help | code help+videos | done | prefs |
Write a method that accepts two strings called 'source' and 'target'. The method returns true if it is possible to create the target string by selecting characters from the source string in order. For example canMake("this source","hour") returns true since "this source" can make "hour" by using the capital letters shown here: "tHis sOURce". Note that letters cannot be used out of order, so canMake("snake","ken") returns false. All strings will consist of ONLY lower-case letters. canMake("zyzmnopq", "zzp") → true canMake("thiswasfun", "isfn") → true canMake("thiswasfun", "kdsfljwe") → false ...Save, Compile, Run (ctrl-enter) |
Progress graphs:
Your progress graph for this problem
Random user progress graph for this problem
Random Epic Progress Graph
Difficulty: 220
Copyright Nick Parlante 2017 - privacy