I dislike traditional phone screens enough that I hone unusual solutions for them. And when they get evil enough, I put them in a public repository.
Here's my FizzBuzz:
https://github.com/ubernostrum/interviewer-hell/blob/master/...
Here's my FizzBuzz:
https://github.com/ubernostrum/interviewer-hell/blob/master/...
My code for "detect if a number is a perfect square", though, is O(sqrt(n)) time and O(1) space and uses no floating point operations. Which isn't quite Newton's method, but also saves me having to memorize an implementation of Newton's method and appropriately causes confusion. Here it is in Python, with obfuscation help from itertools:
https://github.com/ubernostrum/interviewer-hell/blob/master/...
And slightly less obfuscated C:
https://github.com/ubernostrum/interviewer-hell/blob/master/...