Wednesday, March 26, 2008

Favorite Interview Questions

I have been interviewing developers for both full time and internship positions for about 2 years now, and have a pretty solid set of questions that I ask. I was trying to find some new questions today and came up empty. I figured I would share my Favorite one, and hopefully people will reblog this with there’s (they don’t have to be technical questions).

int atoi( char* pStr )

write the definition for this function without using any built-in functions. if pStr is null, return 0. if pStr contains non-numeric characters, either return 0 (ok) or return the number derived so far (better) (e.g. if its “123A”, then return 123). assume all numbers are positive. plus or minus signs can be considered non-numeric characters.

And a Logic one for good measure:

Mary baked a rectangular cake. Merlin secretly carved out a small rectangular piece, ate it and vanished! The remaining cake has to be split evenly between Mary’s two kids. How could this be done with only one cut through the cake?

blog comments powered by Disqus