Why it is giving array index out of bounds exception | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

Why it is giving array index out of bounds exception

https://code.sololearn.com/ca18A9A253a2/?ref=app

16th Apr 2021, 3:19 AM
๐ŸŽถ๐Ÿ’žSravs๐Ÿ’ž๐Ÿฅ€
๐ŸŽถ๐Ÿ’žSravs๐Ÿ’ž๐Ÿฅ€ - avatar
3 Answers
+ 4
๐ŸŽถ๐Ÿ’žSravs๐Ÿ’ž๐Ÿฅ€ Because there is i++ on line number 24 there should be i-- and on line number 33 there should be i < size https://code.sololearn.com/cTr6QSOIhtlZ/?ref=app
16th Apr 2021, 3:37 AM
AอขJ
AอขJ - avatar
+ 3
Line 33 i<size
16th Apr 2021, 3:32 AM
Avinesh
Avinesh - avatar
+ 1
Tq
16th Apr 2021, 4:36 AM
๐ŸŽถ๐Ÿ’žSravs๐Ÿ’ž๐Ÿฅ€
๐ŸŽถ๐Ÿ’žSravs๐Ÿ’ž๐Ÿฅ€ - avatar