Ad
  • 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

    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.