5 ms·
It can't be linear time. At best it would be log(n) but that would require storing all the possible inputs in a lookup table.
by ezfe 2y ago
It can't be linear time. At best it would be log(n) but that would require storing all the possible inputs in a lookup table.