2 ms·
No, I was quite explicit, and seriously, is it really that hard to write something along the lines of if (i<=1) return i; else return fa
by dhosek 4y ago
No, I was quite explicit, and seriously, is it really that hard to write something along the lines of
if (i<=1)
return i;
else
return factorial(i-1)*i;
It wasn't meant to be a trick or trap, it was the simplest recursive function I could think of and it’s not like I was asking him to implement a stack.