[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Offtopic: How to Design Programming Tests



some more questions to assess their depth:

I always ask potential programmers to compare the advantages and
disadvantages of arrays versus linked lists. It is *astonishing* to me
that some people with CS degrees are completely incapable of answering
that question, and you can often distinguish candidates with strong
analytical and reasoning abilities from those that don't think at that
level. 

Another question I often ask: assume you have a(n unordered) set of
numbers, and you know nothing about the range or distribution of the
numbers. How would you go about finding if there exist two numbers in
the set that add up to m?  This question tests their mastery of data
structures. Everyone gets the dumb n^2 method first, the better ones
upon more thought decide to do a sort first and get a n log n
solution, and the occasional standout thinks about creating a hash
table to get a near-linear solution.

-bogo