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

 

tmhscs@gmail.com sets > removeDuplicateWords
prev  |  next  |  chance

Return a list of all words in a sentence, removing duplicates, alphabetized. Ignore case.


removeDuplicateWords("This one has a little star. This one has a little car.") → ["a", "car", "has", "little", "one", "star", "this"]
removeDuplicateWords("One fish, two fish, red fish, blue fish") → ["blue", "fish", "one", "red", "two"]
removeDuplicateWords("James while John had had had had had had had had had had had a better effect on the teacher") → ["a", "better", "effect", "had", "james", "john", "on", "teacher", "the", "while"]

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

public List removeDuplicateWords(String str) { }

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: 200

Copyright Nick Parlante 2017 - privacy