3 ms·
0! == 1 EDIT: Oops. As pointed out below, the code is indeed incorrect, and my comment is irrelevant.
by rahimnathwani 9y ago
0! == 1
EDIT: Oops. As pointed out below, the code is indeed incorrect, and my comment is irrelevant.
- kelnage 9y agoTrue, but irrelevant. For all values of n > 1, that function will return 1, which is clearly not what the author intended.