Passing SWE interviews

How to study and practice for behavioral and technical interviews

Let’s say you got an interview for a paid or unpaid software engineering internship that you are interested in. Now, how do you pass the interview? Here are some tips that worked for me.

Behavioral interviews tips

Be prepared to answer general, open-ended questions where the interviewer tries to learn more about you and assess your seriousness for taking on the job, such as:

  1. Tell me a bit about yourself.
  2. Why are you interested in working at our company?
  3. What do you want to do in the long term, after completing the internship?
  4. Tell me about a time when you were most challenged. How did you overcome the challenges?
  5. Why do you think you would be a good fit for this role?

This list is definitely not exhaustive, and each interviewer will probably ask different questions. Regardless, they will be evaluating your ability to communicate, your level of motivation, and your potential to contribute positively to their company.

Here are a few tips when answering behavioral questions:

  • Don’t rush when you speak. Inexperienced interviewees often talk too fast and ramble. Slow down and think about what you say.
  • Smile, be confident, and be humble. This can improve their impression of you. Also, people generally favor working with people who seem easygoing, reliable, and friendly.
  • Be genuine. Don’t try too hard to answer questions in a way that you think will impress them. You don’t want to look like you’re faking interest.
  • Be positive. Don’t bash on your previous experiences, even if they were very negative. Try to put things in a positive light. People don’t want to work with downers.
  • Practice answering common behavioral questions such as those above and others you can find on Google. Literally say your answers out loud. You can also try talking to yourself, acting like both the interviewer and interviewee, to simulate how the conversation might go. I find this trick to be a powerful way to improve my communication skills and improve my conversational flow.

Technical interview tips

You can prepare for technical interviews in various ways: taking certain courses, reading certain books, and practicing programming problems.

Courses:

  • Take or review courses that cover data structures and algorithms. Many entry-level internships will ask questions related to these things.
  • It may help to take an algorithms course earlier on, like in your sophomore year (or even freshman year, if you can handle it), so that you have knowledge of and practice with different algorithms that could be helpful for solving certain programming questions that may appear in technical interviews. If you can’t handle taking algorithms early on, perhaps try auditing or sitting in on the course, or taking free online algorithms courses, like those on Coursera.
  • Some more advanced interviews may cover material from math or statistics. For example, if you’re applying for machine learning internships, they may ask you to derive by hand the gradient for a node at a certain layer of a neural network, testing your knowledge of backpropagation and calculus. Be ready for more mathematical questions like this if you are applying for more specialized internships, by reviewing courses in math (calculus, linear algebra) and statistics.

Books:

  • Read parts of Cracking the Coding Interview that you don’t already know about. This is a must.
  • For more practice with algorithms, consider reading “Introduction to Algorithms” by Cormen, Leiserson, Rivest, and Stein. Beware that the book is long though. It’s probably more helpful to review chapters on algorithms you are less familiar with than trying to go through the whole book.
  • Read the System Design Primer on GitHub here: https://github.com/donnemartin/system-design-primer
  • Not a book, but browse the r/cscareerquestions subreddit on Reddit for useful resources. Here is one example with useful tips: https://www.reddit.com/r/cscareerquestions/comments/6278bi/my_journey_and_tips_29_gpa_at_a_noname_liberal/

Practicing programming problems:

  • Do LOTS of practice problems on LeetCode! This is also a must. Start with easy problems, then try medium difficulty problems, then take a look at a few hard problems (which are quite difficult). If you can do mediums comfortably, you should be good to go for beginner-level interviews. Note that it might take a long time before you start building intuition for solving these types of problems. Some people are fine after doing 10 mediums; others need 200.
  • Be patient, and try not to jump to the solution without thinking about your own approach first. You won’t grow or build intuition if you don’t test your understanding and challenge yourself.
  • Try a brute force approach if you can’t start with a more clever one, and analyze the time and space complexities to find the obvious limitations, and work from there. Try to practice not getting “stuck” or “paralyzed” by the question. Say out loud what you are thinking. Interviewers like to see how you think. It is not a good sign if you just freeze during the interview. It is better to start with a naive solution than no solution at all.
  • Sometimes you can find company-specific coding questions on websites like Indeed, so check those and see if you can answer them.
  • Make sure you know algorithms like dynamic programming (DP), and the pros and cons! Practice questions that involve DP, and you might start to recognize patterns that allow you to know when you should be using DP to solve the problem efficiently.
  • Ask your friends to simulate technical interviews by asking you coding questions that they received before, or random questions from LeetCode.
  • Don’t get discouraged! Even the smartest people can fail technical interviews very badly, especially if they are not used to answering questions testing data structures and algorithms or system design. You might totally fail your first few interviews, and that’s totally fine. It happens to the best of us. I’ve totally bombed an interview before, but it was a good learning experience and a humbling reminder that I need to practice to get better, rather than trying to wing it.

Technical interviews can be really frustrating to prepare for and go through, but you’ll get better with more practice and experience. Stay strong and don’t give up!