« Everything you need to know about Locales | Main | I am not worthy (to post on reddit) »

01/17/2010

TrackBack

TrackBack URL for this entry:
http://www.typepad.com/services/trackback/6a0115711bf0ae970b0120a7e39b8a970b

Listed below are links to weblogs that reference The Best Programming Interview Question – ever!:

Comments

Feed You can follow this conversation by subscribing to the comment feed for this post.

The answer is: 19. You have 7, 17, ... 97. And you have 70, 71, ... 79.

The most common answer is 10 - the 7, 17, ... part.

The second most common answer is 11 - they also get 70.

Some people say 20 (counting 77 twice) - I consider that a correct answer for the purpose of the interview.

So, did you get it?

I did get 19 but had to remove my shoes to get there. Is that bad in an interview?

I get 19 in about 2 seconds. That makes me feel great!!, and yes. i think am a good developer

Dumb logic tricks don't mean much when looking for a competent programmer.

Kindergarten admission test?

Congratulations on using the most derided writing tool EVER!!!!

I think being able to solve this "dumb logic trick" speaks to your ability to fully cover corner test cases, which helps you write correct code faster. We all know that one programmer who would miss the special cases for 7's the first time, but check his code in anyway. Then when he gets a bug report saying there's a problem with 7's, he checks in a fix for a 7 in the one's digit. The bug report gets sent back to him again to handle the 70's, then yet again to handle the duplicate 77. In a real program, it's conditions like full buffers, empty buffers, null pointers, etc., but the mode of thinking is the same.

I got 19 in a few seconds, then spent the next several minutes trying to find something I'd missed!

Nice post. Thanks

Is this really The Best Programming Interview Question – ever! ? really? A high school kid can do this few seconds.

What nonsense.

18. Missed by one. I was over-protective in not counting 77 twice. :)

this was really a dumb article by being way ahead with any other competition

it was really a high school level question solvable in few secs.

from now on, dont ever put your article on dzone etc
just stop wasting ppl time.
u dumbo
what a height of stupidity of having such a title

I don't know why so many people think there are only 19 sevens, I think the answer is really 20. 7,17,27,37,47,57,67,70,71,72,73,74,75,76,77,78,79,87,97.

Verify your Comment

Previewing your Comment

This is only a preview. Your comment has not yet been posted.

Working...
Your comment could not be posted. Error type:
Your comment has been posted. Post another comment

The letters and numbers you entered did not match the image. Please try again.

As a final step before posting your comment, enter the letters and numbers you see in the image below. This prevents automated programs from posting comments.

Having trouble reading this image? View an alternate.

Working...

Post a comment