Simple answer description:


#1

J is initiate only at start to be 0,
in the inner loop it is only increases,
after max N operation it would always be greater then N,
so j++ could happens max N times