Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
gcp
on Oct 13, 2016
|
parent
|
context
|
favorite
| on:
Google's “Director of Engineering” Hiring Test
Your code has 6 shifts, 6 adds/subs and 6 ANDs.
You can do it with 4 shifts, 3 adds, 1 MUL and 4 ANDs.
Your code is simply suboptimal.
monocasa
on Oct 13, 2016
[–]
For a 64bit quantity? I'm curious to see your algorithm in actual code.
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search:
You can do it with 4 shifts, 3 adds, 1 MUL and 4 ANDs.
Your code is simply suboptimal.