I am trying to alternate the numbers of two Sequences. Right now getting an infinite loop.
any suggestions? Here is my method.
public ArrayList<Integer> merge (Sequence other)
{
for (int i =0; i < other.values.size(); i++)
{
if (i%2==0)
{
for (int j =0; j < values.size(); j++)
{
other.values.add(i, values.get(j));
}
}
}
return other.values;
}