I need help understanding why the two statements I have underlined with red are correct. I am confused as to how we can get $n + 1$.
And how $i \le n$ is true when it says $i < n$ in the while.
Computer Science Stack Exchange is a question and answer site for students, researchers and practitioners of computer science. It only takes a minute to sign up.Sign up to join this community