3 ms·
The problem with FizzBuzz is that it's too well known. So it's basically something which has very little signal because people can just google it and memorize
by tytso 8y ago
The problem with FizzBuzz is that it's too well known. So it's basically something which has very little signal because people can just google it and memorize the solution.
Two of my favorite phone screen questions (now unfortunately banned because the have been identified on various web sites like Glassdoor as being Google interview questions) were "validate a UTF-8 string" (the interviewee is given the UTF-8 rules), and "add an integer to a bignum" (the interviewee is told what a bignum is if they don't know that term).
Both of these are really simple programming problems that the experienced coder should be able to knock off in 5 minutes. The absolutely terrifying thing is that there are fresh graduates with a CS degree who couldn't deal with either of these in the full 45 interview slot. I'm not sure what colleges are teaching these days, but it's certainly not programming as I know it...
The reason why these were my favorite phone screen questions was if the candidate couldn't hack a question like that, I could very confidently write up my interview report and tell the recruiter --- don't bother with the expense of bringing the candidate on site and asking 4-6 software engineers to spend 2-3 hours interviewing the candidate and then writing up a comprehensive set of interview notes/report.
- cletus 8y agoThe point is "like FizzBuzz" not "actually FizzBuzz". This could just as easily be: - Add all the odd integers in an array - Count the number of vowels in a String (bonus points if they ask about Unicode vs ASCII in the context of what constitutes a vowel). ASCII is the easy case. Unicode is a little more involved. Handle upper and lower case (they should figure out this is an issue). - Given a set of Strings find all the characters (or words if you prefer) that are unique to only one of the Strings - Given an ordered sequence 1..10 and the operators {+,-,/,*} where you can put any operator between two numbers but maintain the number order and operator precedence, find the number of operator combinations that yield 5 digit positive integers. Brute force is totally fine. Pick any category of answers you like in fact. Writing this one will take longer than FizzBuzz but the important point here is no specialist algorithmic knowledge other than how arithmetic works is needed and there is no special trick memorization. I can come up with a million examples like this.
- xorcist 8y ago> Count the number of vowels in a String Unicode is a little more involved? I wouldn't even know where to start for the mostly trivial western European languages, and that's without leaving high bit ASCII territory. I'd probably end up making a list by hand of every possible vowel. But that's not doable for Unicode. What does it even mean for things like ideographic characters?
- Const-me 8y ago> the experienced coder should be able to knock off in 5 minutes An inexperienced one will knock off in 5 minutes. An experienced one will know that the code you'll write in 5 minutes will be way too slow, by an order of magnitude slower than good library implementations. For UTF8 see this: https://github.com/CppCon/CppCon2018/blob/master/Presentations/fast_conversion_from_utf8_with_cpp_dfas_and_sse_intrinsics/fast_conversion_from_utf8_with_cpp_dfas_and_sse_intrinsics__bob_steagall__cppcon_2018.pdf https://github.com/CppCon/CppCon2018/blob/master/Presentatio... For bignums this: https://en.wikipedia.org/wiki/Intel_ADX https://en.wikipedia.org/wiki/Intel_ADX As you see, neither is solvable in 5 minutes. The examples in a neighbor comment are very good, BTW.