STDYTAB - Editorial

The if statement
if ( i == N + 1) return 1;
means if all the rows have now been done then this is a valid array so return 1 as it’s one possible solution. The reason it’s N + 1 is because there are N rows and the pseudo code starts at 1.