I am getting array out of bound exception but not able to understand my mistake


this is my code

the link to your code isn’t correct. Please post the correct link

When i = arr. Length - 1 then j becomes sqaure of it but this index doesn’t exist in this array, that’s when it throws array index out of bounds exception