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

 

removeDuplicateWords


Return a list of all words in a sentence, removing duplicates, leaving in original order. Ignore case.


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

...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: 20

Copyright Nick Parlante 2017 - privacy