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

 

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

Given a ciphertext str and a set of code words and phrases, remove all entries from codes that are present in the ciphertext. The code words/phrases could be present in any case (upper or lower or mixed), and could be present within other words in the ciphertext. Return a toString of the codes ArrayList after the elements contained within str have been removed. Although it will probably have less elements after the removals, the remaining elements must still be in their original order.


apcsaExcludeHiddenWords("I went fishing in the sea and found a large squid.", ["squid", "tentacle", "fish", "found", "eats"]) → "[tentacle, eats]"
apcsaExcludeHiddenWords("The finalists for runway model of the year are Cassaway Jane and Runta Fastomi", ["light", "run", "help", "attack", "eat", "fast", "away"]) → "[light, help, attack, eat]"
apcsaExcludeHiddenWords("When you feel like laughing uncontrollably or giggling at amazing things that your friends do, maybe it's time to talk to your doctor about Gloomitrol. Gloomitrol is a once-daily medication that will help you eliminate humor from your life. Side effects include reduced life span.", ["like", "it's time", "you feel", "find", "friends", "eliminate", "a way", "reduce", "help you", "from your", "to escape", "help", "maybe", "get help", "your life"]) → "[find, a way, to escape, get help]"

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

public String apcsaExcludeHiddenWords(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