Hi, I am trying to divide array elements in low and high using a single for loop. But, I don't know why I am getting ArrayIndexOutOfBoundsException. I tried working it out on paper and it seems correct. Can anyone point out my mistake?

Thanks!!

```
for(int i=0;i<=n/2;i++)
{
ALow[i]=A[i];
AHigh[i]=A[i+n/2];
}
```