We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
interesting problem, had a lot of fun micro-optimizing it, though with that said it really should be marked advanced, overall neither I nor the editorial could reduce the time complexity to 2^d or lower, i.e. constant overhead; the best I got was a factor of ceil(n/w) where w is the largest machine word in bits while the editorial is at n; note that the editorial has little to no micro-optimizations, as such the likelyhood of actually passing all the testscases without compile optimization flags is very low, its still a good start, good luck.
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Clues on a Binary Path
You are viewing a single comment's thread. Return to all comments →
interesting problem, had a lot of fun micro-optimizing it, though with that said it really should be marked advanced, overall neither I nor the editorial could reduce the time complexity to 2^d or lower, i.e. constant overhead; the best I got was a factor of ceil(n/w) where w is the largest machine word in bits while the editorial is at n; note that the editorial has little to no micro-optimizations, as such the likelyhood of actually passing all the testscases without compile optimization flags is very low, its still a good start, good luck.