And if you are unable to sort an array it's a strong signal that command in all other areas of CS is lacking. Does C++ has a standard library for RSTP? Do you think a person who can't sort an array after 5 years of school would be able to fix a bug in a switch' spanning tree implementation?
In your case, at the end you've only figured out that your candidate knows how to sort an array, which even high-school students can do. You can confidently say that your candidate has a level somewhere between student and Donald Knuth, a pretty useless piece of information.
Is there any connection between sorting arrays and spanning trees? If I'm not mistaken, the latter involves graphs.
So I'm not quite sure what is your beef with it exactly. Do you think I should have used a more complicated task? Like, Dijkstras' on a graph? Are you sure that you wouldn't find that objectionable too, given that sorting an array is apparently asking too much?
a) is too easy
b) doesn't have enough meat to differentiate between junior / regular / senior
c) covers very little if anything at all from what a SWE does on their day to day. OTOH I guess/hope you had more things, not just this.
This was the only coding test but we also either talked through opensource code candidates brought in or discussed some parts of one our real project here.
But, you are hiring for a software developer, who should be able to translate business problems that you face everyday into a working system. Don’t you have any real world scenarios that you could use to test on?
Does C++ has a standard library for RSTP?
Maybe not, but I know that there are very few new problems under the sun that most people face and someone has solved the problem before. I also know how to use Google.
https://stackoverflow.com/questions/1460010/best-c-rtp-rtsp-...
(before you go on googling again, the algorithm operates over the switch port forwarding fabric, you can't really use a library)
Both approaches however would be beyond the skills of a programmer who can't sort an array. And really it's not a high bar, I don't understand this obsession with anti-intellecualism. Everyone likes plumbing analogies, well I wouldn't trust a plumber who doesn't know that water generally tends to flow downwards - it's this level of CS knowledge we are talking about here.
Now if someone did a BogoSort, I would hire them just for their ingenuity and sense of humor.
I like the people I work with to have a good sense of humor.
Accepting things like bubble sort also makes the exercise doubly pointless.