Is it just me or is this a baffling tech interview question

Posted by Matthew Patrick Cashatt on Programmers See other posts from Programmers or by Matthew Patrick Cashatt
Published on 2012-04-12T21:10:12Z Indexed on 2012/04/12 23:43 UTC
Read the original article Hit count: 343

Filed under:
|

Background

I was just asked in a tech interview to write an algorithm to traverse an "object" (notice the quotes) where A is equal to B and B is equal to C and A is equal to C.

That's it. That is all the information I was given.

I asked the interviewer what the goal was but apparently there wasn't one, just "traverse" the "object".

I don't know about anyone else, but this seems like a silly question to me. I asked again, "am I searching for a value?". Nope. Just "traverse" it.

Why would I ever want to endlessly loop through this "object"?? To melt my processor maybe??

The answer according to the interviewer was that I should have written a recursive function.

OK, so why not simply ask me to write a recursive function? And who would write a recursive function that never ends?

My question:

Is this a valid question to the rest of you and, if so, can you provide a hint as to what I might be missing? Perhaps I am thinking too hard about solving real world problems. I have been successfully coding for a long time but this tech interview process makes me feel like I don't know anything.

Final Answer:

CLOWN TRAVERSAL!!! (See @Matt's answer below)

Thanks!

Matt

© Programmers or respective owner

Related posts about interview

Related posts about algorithms