4 ms·
I need help with this. I intuitively count with starting at one. In a for loop, if we start with 0, then the terminating condition is i less than n. However,
by hi41 7y ago
I need help with this. I intuitively count with starting at one.
In a for loop, if we start with 0, then the terminating condition is i less than n.
However, ifvit starts at 1, then the terminating condition is i less than or equal to n.
What mental trick do you use to remember that?
- fctorial 7y agon is n steps ahead of 0,and thats what < checks for.