Hi! Please help, I am not sure why it does not pass the tests. I strongly suspect that it is about line 20:
ArrayList<String>[] result = (ArrayList<String>[])new ArrayList[size];
I tried several ways to declare this array but no luck. As per Oracle's documentation, we Cannot Create Arrays of Parameterized Types. Please give me a hint here. Thanks!