You are viewing a single comment's thread. Return to all comments →
create an array of arraylist and initialize them
ArrayList<Integer>[] group = new ArrayList[N]; for (int i = 0; i < N; i++) { group[i] = new ArrayList<Integer>(); } then the rest is quite easy
Seems like cookies are disabled on this browser, please enable them to open this website
Dynamic Array
You are viewing a single comment's thread. Return to all comments →
create an array of arraylist and initialize them