- Problems(with solutions) categorized based on the companies. It has problems from interviews of companies like Google, Microsoft, Adobe, Goldman Sachs and more than hundred other companies
http://www.careercup.com/page
There are some useful tips other than problems as well. You may wanna check those out too.
- Common puzzles asked in the interview and tests(I was asked half the questions in my interview from this problem bank).
http://research.microsoft.com/en-us/um/people/leino/puzzles. html - Puzzles(with solutions) with ratings(difficulty level) for each puzzle.
http://www.qbyte.org/puzzles/puzzle02.html
(Check out the previous posts also for the problems asked in some of the interviews last year)
Just for the starter, here are a few problems which were asked in Adobe's interview. My friend Romil was asked these problems in the interview and he wrote some of them down to share with everybody .
- You are given a binary tree and 2 data values. Find the lowest common ancestor of the two concerned nodes( Only data values are given, not pointers to nodes).
- An array contains integers in the range 1-n. There are n-1 different numbers in the array and one is repeated. Which number is missing? Use only a single pass and don't allocate additional memory.
- Consider the following hash function: h(x) = ((x mod 1000) div 100) + x mod 10
What kind of values will map to the same location? - Output of following:
int *i, *j;i = (int*)60;
j = (int*)20;
printf(i-j);
- Two players take turns choosing one number at a time (without replacement) from the set {−4, −3, −2, −1, 0, 1, 2, 3, 4}. The first player to obtain three numbers (out of three, four, or five) which sum to 0 wins. Does either player have a forced win.
- Consider a two dimensional grid with nodes (x,y) where x,y>0. Consider a particle initially at point (1,1). If the particle is at (x,y), it can move to either (x+y,y) or (x,x+y). Can the particle starting at (1,1) reach (m,n)? What should be the relation between such m and n?