FizzBuzz, reversing a sentence -- this is programming your way out of a wet paper bag, not elite and esoteric skills that need advanced study and cramming
FizzBuzz, reversing a sentence -- this is programming your way out of a wet paper bag, not elite and esoteric skills that need advanced study and cramming
String.Join(" ",
String.Split(" ", sentence).Reverse()))If I ask that of a senior candidate, it’s because I got a whiff of “this candidate might not be able to code at all, and I’d like to save us both some time and frustration.”
And that’s for someone with only a 50/50 success rate at summing an array of integers. Do you want to hire someone for a software role who is an underdog to be able to sum an array of ints?
The beauty is, even a simple exercise answered quickly like "sum of integers" provides ample opportunity to learn a lot about how they think.
Start digging in to testability, requirement changes, etc. Change it to a rolling sum (producing a sequence instead of a single value). Do they use an array or an iterator? Do they output straight to the console, or produce an actual function? Could the numbers come from other sources (database, queue, etc)? What might the tradeoffs be? If there's something they are unfamiliar with, are they quick on the uptake if you explain it? And so on.