• Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar

    your list isn't typed, apparently (but maybe that's because the generic type as been swallowed as a tag by themarkdown engine...)

    I checked (again), and my solution passes in Java 11 and 8 while returning either Arrays.asList() or new ArrayList<String>(), or even List.of() for J11. So I guess that your function is getting "true" for the condition, then add an empty string somewhere while it shouldn't...?

  • Custom User Avatar

    This is the problem I'm stuck on, I don't think this is actually completeable. using my IDE I coded up this:
    List al1= Arrays.asList();
    List al2= Arrays.asList();
    pln(""+al1+al2); //[][]
    pln(""+(al1==al2)); //false
    pln((Arrays.asList()==Arrays.asList())+""); //false
    Java will always compare the references here and not the content so idk how people passed this in java

  • Custom User Avatar

    if there are no words, then this is what is outputted:
    List finalout = new ArrayList<>();
    if(!wordlist.isEmpty())
    //do things to fill in the list
    return finalout;

    I don't know the intricicies of java enough to know if that creates an empty string within the array list.

  • Custom User Avatar
  • Custom User Avatar

    Sure: 99% of chances that you have an array list with an empty string inside (hence a list of length 1) instead of an actual emtpy list.

  • Custom User Avatar

    Can someone help me understand what i'm doing incorrect to be getting this error?
    I'm in java:
    expected: java.util.Arrays$ArrayList<[]> but was: java.util.ArrayList<[]>

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution