I have this arraylist in which I am traversing till list.size() and in each iteration accessing two adjacent values in a nested loop to populate the list with n
list.size()