I\'m having trouble figuring out what type parameter is expected at RHS of the following
ArrayList>[] nodes = new Array
Don't use an array. Use another ArrayList.
ArrayList>> listOfLists = new ArrayList>>(); listOfLists.add(new ArrayList<>());