Because the specs say so. Arguments start at 0, number of squares starts at 1 - there's your + 1.
0
1
+ 1
The specs could easily have said something different ( and arguably more sensible ), but they don't.
excellent these test cases are perfect
can someone explain why are we doing it for n+1 not for n, am I missing out something ?
n+1
n
Loading collection data...
Because the specs say so. Arguments start at
0
, number of squares starts at1
- there's your+ 1
.The specs could easily have said something different ( and arguably more sensible ), but they don't.
excellent these test cases are perfect
can someone explain why are we doing it for
n+1
not forn
, am I missing out something ?