by kaptain · 13y ago · 0 comments
Honestly it's quite sad; living here in China makes you realize how awful an educational system can be. It's not the worst system… at least I don't have a way of verifying that its the worst system, but the lack of institutional oversight into ensuring the quality of education (ie the system, except perhaps at the highest levels, is a money sucking, rubber stamping, paper printing factory) means that you have millions of individuals tasked with building bridges when they can't be sure if they can build a table.
(it is no excuse that he couldn't implement them, especially given you can google tens of thousands of implementations of each in every language imaginable, but I can't for the life of me come up with a reason to create yet-another-implementation in this day and age)
/rolleyes
Clearly, this is not conducive to creating a repeatable test. Therefore any test must involve reproducing code that already exists.
If you are going to ask a candidate to reproduce code that already exists, it stands to reason that you would ask them to create something for which the definition is well understood in order to make the question fast to ask and require little explanation.
Therefore a linked list or hash table is a good example of a practical coding question. It's a good test to give you a negative result even if it's not a good test to get a positive result.
struct foo { int x; struct foo *next; };
(a simple struct for your linked list isn't really the implementation for the linked list operations. obviously in C you would define your own next pointer. i seriously doubt this guy had trouble with that part of it.)
I wouldn't expect someone who's taking one computer science class to be able to implement a hash table.