I was asked this interview question:
what is the quickest way to multiply a number by 7.
she told me not to use any of the + , - , * , /
operators.
In tense,i could not answer the question.
I know the quickest way to multiply a number by 8 is n<<3
but can n*7
be acheived?
Assuming your compiler isn't terrible, n*7
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With