I said θ ;)
In other words, your algorithm is asymptotically too fast and you failed the interview! :D
In other words, your algorithm is asymptotically too fast and you failed the interview! :D
That said a fixed-factor mutiplication can probably be done faster AND [more] precisely as a sum of some shifts. Or many other ways with a lookup table.