3 ms·
It doesn't get TCOd, the compiler simply recognizes what it does and optimizes it. It does literally same thing with the code below. int count(int n) {
by Hitton 6y ago
It doesn't get TCOd, the compiler simply recognizes what it does and optimizes it. It does literally same thing with the code below.
int count(int n) {
int res = 0;
for (int i=0; i < n; i++) res++;
return res;
}