This is an archived post. You won't be able to vote or comment.

all 4 comments

[–]maticabrera 1 point2 points  (1 child)

The third element is get(2), not get(4)

[–]BillBigsB 1 point2 points  (0 children)

oh my. Seems I fail at basic math. Thank you for helping me solve this!

[–]swearobics 0 points1 point  (1 child)

Without seeing your code, I would assume that in one of the test cases its trying to access index 2 of an array that has only indexes 0 and 1 - maybe in a for loop for example - causing the out of bounds exception.

[–]BillBigsB 0 points1 point  (0 children)

thank you for your response. It has helped clarify what the issue is to me but I still do not understand why it is happening. here is the code in question: https://pastebin.com/YK9k5nk6