I am trying to get only the odd or only the even index of a array list.
For example, my array list is 20.
And i want to separate out the odd and the even index.
Odd: 1,3,5,7,9,11,13,15,17,19
Even: 2,4,6,8,10,12,14,16,18,20
How can i go about doing it??
wouldn’t it make more sense to make a structure like
and make an array of those instead of misusing array indices?