Skip to content

codingforinterviews/practice-problems

Repository files navigation

The Practice Problem Compendium

Tired of Googling around for programming interview practice problems? This is a project to build high-quality practice problems suggested for preparing for programming interviews.

Suggested Practice Questions

  1. Array Rotation: take a given array and rotate it n slots (10-20 minutes)
  2. Coin Change: how many different ways can you make change given an amount and list of coins?
  3. Tree Zig Zag: alternate between the left-most and right-most nodes in a BST.

How should you approach these problems?

  1. Code in a realistic fashion. If you're doing a whiteboard interview, practice with a whiteboard. If you don't have a whiteboard, writing your solution on paper can be a good substitute. Phone interview? Try using the online code pad they will have you use.
  2. Always compile your code after writing it. You'll often find bugs in your solution. Think—how might you catch this problem in the future?

What makes a good practice problem?

  1. Representative of many problems
  2. Has shown up (or could reasonably show up) in real interviews
  3. Takes less than an hour
  4. Not language-specific
  5. Two kinds of problems: more involved complex ones (company challenges)—good for overall practice more specific targeted problems—better for checking understanding
  6. Not breaking any confidentiality agreements

Interested in getting even more involved? Feel free to submit problems and solutions as pull requests. Email [email protected] to get more involved with the group and join our planning Trello board.