Alright, it's time for some programming trick questions
-
-
What's the fastest way to test whether a 32-bit integer is a perfect number?
-
Answer: `return x == 6 || x == 28 || x == 496 || x == 8128 || x = 33550336;` For 64-bit integers you need only three additional terms
- 4 more replies
New conversation -
-
-
You did not specify the length of the array or if duplicates were allowed. Just as devil's advocate.
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
special case of a pigeonhole sort, really.
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.