home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.c++
- Path: sparky!uunet!charon.amdahl.com!pacbell.com!ames!purdue!mentor.cc.purdue.edu!noose.ecn.purdue.edu!en.ecn.purdue.edu!krauskop
- From: krauskop@en.ecn.purdue.edu (Curtis D Krauskopf)
- Subject: Re: New Employee Test
- Message-ID: <1992Nov19.002724.13837@en.ecn.purdue.edu>
- Summary: My employee test in C
- Organization: Purdue University Engineering Computer Network
- References: <assist.721943530@orion.oac.uci.edu>
- Date: Thu, 19 Nov 92 00:27:24 GMT
- Lines: 39
-
- I run a database programming company. My favorite interview questions
- ask the candidate how a bubble sort works. Later in the interview,
- I ask the candidate to "write a C function to bubble sort an array of
- integers on paper, and tell me how long you think it will take". It
- is the candidate's responsibility to ask about the parameters of the
- function, the return value, whether the sort should be ascending or
- desending, how many integers are in a typical array.... etc. Any
- reasonable question, regardless of its nature, is a bonus point.
- Suggestions that a quicksort or other algorithm be used (especially
- since quicksort is a standard library function) get many bonus points.
- If the candidate asks, they can have full access to the company library
- of C books. (I don't believe in closed-book tests, especially on-the-job).
-
- When the candidate returns with the answer, I have them desk-check a
- bubble sort function that has some bugs in it. I tell them that the
- function compiles, but it doesn't work right. I also have them
- rewrite the function so that it runs more quickly (the function uses
- a brute-force bubble sort with an off-by-one error in the two loops
- and it calls a function called swap() to swap the two integers).
-
- Now granted, it isn't every day that a programmer writes a bubble sort,
- but I've been amazed at how much this sequence of questions has told me
- about a programmer's ability, their systems analysis experience, their
- ability to communicate technical issues, and their awareness of details
- behind how a languges operates.
-
- I do not dock the candidate too many points for not knowing or remembering
- how a bubble sort works. Once I explain it to them, though, I would expect
- them to be able to write the function. I also take into consideration
- whether the candidate has any 'real-life' work experience when evaluating
- the questions (or lack thereof) when the candidate asks about the function.
-
- Although my example isn't in C++, I think you could arrange it to be a
- C++ program, maybe even having the candidate create a class to bubble
- sort integers.
-
- Curtis
-
-
-