Java program to fetch unique words from a paragraph.. | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

Java program to fetch unique words from a paragraph..

Write a function that accepts two parameters. The first parameter is a String representing a bunch of sentences (like a paragraph) and the second parameter is an int. The function should return a List<String> of unique words, from the input string. The list should be sorted based on the second parameter. If the second parameter is 1, then the list is ordered in alphabetical order. If it is 2, then the list is ordered based on the word length. If the word lengths of two or more words are same, then they must be ordered alphabetically...I had writen the code.But I am not getting full marks for it..Some eval test cases and eval unit tests are failing..The code is for my training purposes..Eval test cases are not visible to us..so can anyone help me?.

3rd Aug 2018, 8:19 AM
Manu
3 Answers
+ 3
We can help you if you post the code link. That way, we can debug it.
3rd Aug 2018, 9:28 AM
Jonathan Pizarra (JS Challenger)
Jonathan Pizarra (JS Challenger) - avatar
0
this is my code
3rd Aug 2018, 9:33 AM
Manu