Simply Array Sum

Problem from HackerRank.

Easy problem but I got confused with the index of the array and its value. I was adding iΒ to my result variable and not ar[i].

 

Leave a Reply

Your email address will not be published.