Stack OverflowInterview programming test practice
[+69] [19] Vagnerr
[2008-08-30 11:43:54]
[ language-agnostic testing interview-questions ]

Does anyone know of some good resources for practice coding questions typically asked in interviews. I know of [1] which is kind of fun to use to exercise your algorithms. And I have seen the occasional test set on company websites. Any others?

Edit: Also found in my bookmarks ...

Another strategy is to just apply to a hole bunch of jobs to get some interview experience. - Thomas Ahle
[+43] [2008-08-30 11:53:02] kronoz [ACCEPTED]

TopCoder is quite hardcore actually, possibly a little OTT for most interviews! However the quality of the algo questions is phenominal.

I find Michael Pryor's (co-founder of Fog Creek, Joel Spolsky's company) Tech Interview site [1] very good.

Steve Yegge's Five Essential Phone-Screen Questions [2] article has some great questions and interview advice there as does his Get that Job at Google [3] article.

Wu::Riddles [4] also has a lot of good riddle-type questions you might be asked on it too.


[+18] [2008-08-30 12:54:42] Ross

I've been working through Project Euler [1] in my spare time for fun and it's a good brain trainer if nothing else.


(1) I like project Euler but it's mostly related to math. It's great to start learning a language, but I don't see any way it can improve your programming skills if you already know the language. - AntonioCS
Project Euler is awesome for Mathematical/Computational part but i don't really know how it can help in interview$ - Pratik
[+13] [2009-04-05 20:11:16] user87379

CareerCup [1] is definitely the best resource. Thousands of interview questions from Microsoft, Google, Amazon, etc. And the CareerCup book is great too.


Do you have careercup book ? Can you provide ebook for the same... - Rachel
The book is great indeed. - Savino Sguera
[+7] [2009-06-18 10:01:10] Jahanzeb Farooq

The book Programming Interviews Exposed [1] very effectively covers some of the most common programming interview questions.


[+6] [2008-08-30 12:26:40] urini

Scott Hanselman has a couple of good posts about ASP.NET interview question and general .NET questions:

This is a classic site with a whole bunch of riddles, algorithms, etc. used in Microsoft interviews:

[+4] [2008-10-23 03:50:07] mawaldne [1] has a ton of interview questions posted by people who had interviews at places like Amazon, Microsoft, Google, etc. Good resource if you want to prepare for a programming interview.


[+3] [2009-12-30 07:38:52] Golam Kawsar

"Programing Pearls" by Jon Bentley is one of the greatest books I have ever read for programming interview preparation. Other than interview prep, it's a great programming book in itself.

[+3] [2010-02-01 23:43:49] JFD

I like Common Interview [1]


[+3] [2011-05-17 03:50:50] 1337c0d3r

This is my blog ( i has 1337 code [1]) with a collection of interesting interview questions. Each question has full solution with thorough analysis including Big O(N) complexity.

Besides, there is also an online judge, which allows you to write and submit your code online. You will get feedback immediately on whether your code is correct, and would tell you which test case(s) that your code failed otherwise. I plan to add more problems to the collection.

I plan to post a new interview question every Monday and Thursday, so feel free to check it out often! :)


[+1] [2008-08-30 12:59:53] Abhinav

Check out the perl QOTW (Quiz of the week) archives [1]


[+1] [2008-09-14 00:47:14] Rob Wells

One of my favourites is to ask

What happens when you enter the following command at a Unix prompt:

cp *

and hit return.

(1) I know what you mean ... but is this relevent to programming? - strager
Nothing, if in an empty directory :P - X-Istence
Cant trust employees if they are going to nuke your repo - Jakob Bowyer
[+1] [2010-03-10 06:45:10] Smart

Best technical interview question collection I have come across... [1]


(2) These contain some of the worst questions on the C language I have ever seen. E.g. "What is the difference between enumeration variables and the preprocessor #defines?" The question presumes that there is a difference, some one thing that differentiates them. Faced with such a question, the honest responder must spend a lot of tedious time undoing the question before he can even begin to give an response. So the responder is encouraged to be dishonest and just give the answer he thinks that the asker expects. And this list is full of such stupid questions. - Tim Schaeffer
[0] [2008-08-30 14:19:42] Chris Upchurch

If you can, it might be a good idea to talk with other folks who've interviewed at this place and see how they ask programming questions. Some places will have you write code on the computer while others expect you to do it on a whiteboard or a piece of paper. Writing code by hand isn't something most of us practice, and it can be difficult, especially if you're used to relying intellisense or other features of your editor or IDE. It might be worth doing some longhand coding as practice.

[0] [2008-09-20 05:19:17] Andy Lester

I'm not saying that programming questions aren't important, but I'd spend more time worrying about the business side of the job you're hiring for.

Do you know what the company does? Do you know what they want you to do? Can you do it? Can you do it in a way that makes the company money? Are you going to get along with other people on the team, so that the hiring manager doesn't have to waste his time dealing with personnel problems?

Technical competence is important in an interview, sure, but what's going to put you ahead of everyone else is making the interviewer (who I hope is the hiring manager) know that you're going to play ball and be part of the team.

Another way to show that you are a competent programmer, which is most of why there are programming questions, is to bring in a portfolio of your work. Bring in source code that you've worked on in the past. Ultimately, programming interview questions are auditions where you perform stunts, but showing a portfolio of code you've worked on in the past will show that you can actually do the work that needs to be done.

This is a big hot-button topic of mine, since I'm writing a book about job hunting for techies. See my website at [1].


[0] [2009-03-03 03:37:33] Han contains a compilation of various programming interview questions and answers at that should prove helpful.

[0] [2009-05-08 07:25:41] uzurpatorul is a compendium of problems (not only computer problems).

[0] [2010-03-10 07:04:03] xxxxxxx

going to interviews is the only best practice for interviews.

[0] [2010-06-08 20:37:41] vsingh

Some very good technical interview questions [1] and quiz are available at Skill-guru [2]

It has conceptual questions as well as coding questions as well. You can compare your results with others who have taken the test


Requires signup to see the questions, and the poster runs the site. Also the site is kind of shady. - RandomEngy
If see any test page for eg , there is a link below "View Questions". You can see the questions. But if you want to take the test and see your score , you will have register. At least they are honest that they ask to register upfront unlike other sites where you have to register at end of test. - vsingh
And why do you say it is shady , is it because color combination ? - vsingh
[0] [2011-05-06 20:03:27] Frank

I wrote BlueberryTree [1] mostly to help me practice for my own interviews. I wrote it shortly after bombing one at Microsoft!

It's an online tutor with video lectures, tutorials and automated grading.


so we can learn how to bomb interviews? - SirYakalot