• + 0 comments

    reinitialize i=-1 and not i=0 because once everything in your for loop is executed i is incremented changing i to 1 from 0. Hope that helps.