about | help | code help+videos | done | prefs |
(MEDIUM) Given an input String and an ArrayList of code words to look for, extract all the code words in the order they are found in the input. Place them into the output String, lowercase given that the ArrayList will only have lowercase letters, with spaces between. Code words can be found with any capitalization in the plaintext, and can also be found inside of other words like "in" within "into." HINT: One easy first step is dealing with capitalization. The String class has nice methods toLowerCase() and toUpperCase() which may be of help here.apcsaExtractHiddenWords("I went fishing in the sea and found a large squid.", ["squid", "fish", "found"]) → "fish found squid" apcsaExtractHiddenWords("The finalists for runway model of the year are Cassaway Jane and Runta Fastomi", ["light", "run", "help", "attack", "eat", "fast", "away"]) → "run away run fast" apcsaExtractHiddenWords("oneBananafish BananatwoBanana fishBananared BananafishBanana blueBananafishBanana", ["fish", "one", "two", "three", "blue", "red"]) → "one fish two fish red fish blue fish" ...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: 320
Copyright Nick Parlante 2017 - privacy