The out of memory error is caused because you never decrease p. Use --p instead of p - 1 here:
Object get2 = a1.get(p-1);
The ArrayOutOfBounds exception is because your break condition never...
Type: Posts; User: DuncanS
The out of memory error is caused because you never decrease p. Use --p instead of p - 1 here:
Object get2 = a1.get(p-1);
The ArrayOutOfBounds exception is because your break condition never...
It's your algorithm, so the burden is on you to make it right in the first place. If you want help with specific questions, this is the place, but from your initial question it seems as though you...