News for hackers. Stuff that matters.
Re:The latest trend for tech interviews: Days of unpaid home... by monocasa on Friday April 20, 2018 @05:34PM (#16888616)
That's awesome! I'd probably follow up that, since I generally interview for real time, firmware jobs, we try to clearly bound execution time, and therefore frown against more functional techniques like that. But you clearly know how to program well and would most likely get a thumbs up. : )
Re:The latest trend for tech interviews: Days of unpaid home... by ubernostrum on Friday April 20, 2018 @06:40PM (#16888913)
Admittedly most of my phone-screen solutions aren't tuned for performance; they're tuned to make people scratch their heads.

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/...