id/email
password
forgot password | create account
about | help | code help+videos | done | prefs
CodingBat code practice

 

orion.a.smith@gmail.com apcsa-encryption > apcsaExtractHiddenWordsWhole
prev  |  next  |  chance

This problem is very much like the one before it in this sequence.


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 with spaces between.  Code words can be found with any capitalization, but now they CANNOT be found within other words.  Meaning, that if a code word is found with a letter before it or a letter after it, it's not actually included in the output.

apcsaExtractHiddenWordsWhole("Helpfully, the new screening of Monster's Ball will be occupying a screen near to you. So bring your love of it out of the closet!", ["fail", "wonder", "monster", "closet", "fish", "red", "green", "help", "blundering", "occupying"]) → "monster occupying closet"
apcsaExtractHiddenWordsWhole("fellow students rejoice, areas of the dorms dedicated to eating treats has been cleaned. Feel free to eat your devils food cake as much as you like, now.", ["iron", "dents", "aluminum", "heaven", "devil", "are", "find", "the"]) → "the"
apcsaExtractHiddenWordsWhole("I went fishing in the sea and found a large squid.", ["squid", "fish", "found"]) → "found squid"

...Save, Compile, Run (ctrl-enter)

public String apcsaExtractHiddenWordsWhole(String str, ArrayList<String> codes) { }

Editor font size %:
Shorter output


Forget It! -- delete my code for this problem

Progress graphs:
 Your progress graph for this problem
 Random user progress graph for this problem
 Random Epic Progress Graph

Java Help

Misc Code Practice

Difficulty: 320

Copyright Nick Parlante 2017 - privacy