Re: Java Interview Questions: Am I Being Too Difficult?

From: Richard Chrenko (richard.chrenko_at_solarenergy.ch)
Date: 05/19/04


Date: Wed, 19 May 2004 08:30:24 +0200

On Tue, 18 May 2004 23:36:53 GMT, Spammay Blockay
<SPAMBLOCKER@BLOCKEDTOAVOIDSPAM.com> wrote:

> I've been tasked with doing technical interviews at my company,
> and I have generally ask a range of OO, Java, and "good programming
> technique" concepts.
>
> However, one of my favorite exercises I give interviewees seems
> to trip them up all the time, and I wonder if I'm being too much
> of a hardass... it seems easy enough to ME, but these guys, when
> I get them up to the whiteboard, seem to get really confused.
>
> The exercise is this:
>
> Create one or more classes that represent a binary tree.
>
> This class(es) must be able to do standard sorts of operations
> one would do on a binary tree in a good, OO sort of way.
>
> A node in this tree holds only a single, String, value.
>
> Now write for me a method named 'find' that takes an argument
> of a String (or a String and a Node, depending upon your
> implementation) and returns a java.util.List of all nodes,
> from the node it's called upon and all descendent nodes, inclusive,
> who's value matches that of the String argument.
>
> The code must be syntactically correct, and would compile.
>
> As an added exercise, how would you make this code thread-safe?
>
> Seems pretty simple, huh? But most guys we've brought in just sit there
> staring at the board, and have trouble even writing the basic
> Node class... they get all confused, don't know how to traverse a
> tree, etc.
>
> Am I unreasonable in expecting someone to be able to do this???
>
> - Tim
>

You say you are responsible for "technical interviews". But the
applicability of your exercise depends to a large extent on the particular
job for which the person is interviewing. For a software architect your
question is way too detailed, for a web developer a bit off-base, but for a
nuts-and-bolts programmer quite relevant. I got my degree in applied
physics and have been architecting scientific simulations and writing core
algorithm code for for nearly 10 years, but have never had to implement a
binary tree. I freely admit that I would struggle with your test - not
because I am an incompetent Java developer, but because it is not
applicable to my particular expertise.



Relevant Pages

  • Re: Java Interview Questions: Am I Being Too Difficult?
    ... > and I have generally ask a range of OO, Java, and "good programming ... > Create one or more classes that represent a binary tree. ... > A node in this tree holds only a single, String, value. ... > As an added exercise, how would you make this code thread-safe? ...
    (comp.lang.java)
  • Re: Java Interview Questions: Am I Being Too Difficult?
    ... > I've been tasked with doing technical interviews at my company, ... > Create one or more classes that represent a binary tree. ... > A node in this tree holds only a single, String, value. ... > As an added exercise, how would you make this code thread-safe? ...
    (comp.lang.java)
  • Re: Java Interview Questions: Am I Being Too Difficult?
    ... > I've been tasked with doing technical interviews at my company, ... > Create one or more classes that represent a binary tree. ... > A node in this tree holds only a single, String, value. ... > As an added exercise, how would you make this code thread-safe? ...
    (comp.lang.java.programmer)
  • Re: Java Interview Questions: Am I Being Too Difficult?
    ... I would dearly love to have someone like yourself as an interviewer! ... > Create one or more classes that represent a binary tree. ... > A node in this tree holds only a single, String, value. ... > As an added exercise, how would you make this code thread-safe? ...
    (comp.lang.java)
  • Re: Java Interview Questions: Am I Being Too Difficult?
    ... I would dearly love to have someone like yourself as an interviewer! ... > Create one or more classes that represent a binary tree. ... > A node in this tree holds only a single, String, value. ... > As an added exercise, how would you make this code thread-safe? ...
    (comp.lang.java.programmer)