A Pinterest Engineering guide to technical interviews
By: Pinterest Engineering
Tags: Engineering, Recruiting, Technical Interview

By Shayda Rahgozar (Recruiter), Nishant Roy (Engineer) and Indy Prentice (Engineer)

Technical interviews are the key component to landing an engineering role. Everything from preparation to asking the right questions is important for a successful interview. In this post, Pinterest employees from Recruiting and Engineering share tips and tricks for acing your interview from start to finish.

Preparing for your interview

Shayda Rahgozar, Recruiting

Practice: The interview itself shouldn’t be the first time you’re hearing and thinking about interview questions. Practice everything from potential questions to concepts ahead of the real deal. Brush up on core CS, general software engineering skills and large scale system design. Companies are constantly refreshing their interview question banks, but you can use sites like Leetcode and Interviewing.io to find great practice questions. Don’t forget to also check out resources like Pinterest open source projects on GitHub and opensource.pinterest.com.

At Pinterest, you can generally code in whatever language you prefer during your interview, though be prepared to be flexible as there may be cases where an interviewer asks you to use a specific language based on team and role. Use this to your advantage when you’re completing practice questions, and take some time to get familiar with the details of the language.

Research: Show interest and passion about the company. If you’re not a regular user of the product already, spend some time getting to know what you could be working on. Share any product pain points or areas of improvement in the interview as well as how you could be involved in helping the company succeed.

Reference the company’s own channels to get a feel for the latest trends, launches and technologies. For example, check out this blog as well as recent news and our Labs initiative for more on the Pinterest Engineering team.

This is your chance to not only showcase your problem solving and coding skills, but also show the interviewer you’re someone with whom they’d like to work.

Working Through the Problem

Nishant Roy, Engineer

Communication: One of the most important aspects of the technical interview is your ability to communicate with your interviewer. Don’t be in a rush to jump straight into writing code. Rather, take some time to think about the problem and share your thoughts out loud. If the question calls for some data structure or system design, the interviewer probably expects a high-level discussion before you actually get started. It’s also a good idea to ask clarifying questions to make sure your understanding of the problem aligns with that of the interviewer. For example, running through a few test cases or drawing some figures to illustrate the problem will help you understand exactly what’s expected, and it will also highlight your ability to communicate and plan out your work.

Attention to detail is essential for a programmer, and your interviewer will evaluate this skill during a coding interview. Usually, an interviewer will not give you all the details for a question up front, such as certain constraints, whether time or space is more important, input format or validity, system scale, etc. Once you’re confident you understand the problem, discussing the details will show the interviewer you’re thinking about how to write a solution that is production-ready. It will also help you understand the problem better and come up with a stronger solution.

Optimizing your solution: Once you’re confident you understand the problem, discuss the details of the solution before writing code. Start with an inefficient solution and think out loud so your interviewer can follow your thought process. Explain why the design is inefficient by discussing the space and time complexity, and try to identify any bottlenecks. Furthermore, think about how much room there is to optimize given the constraints of the problem. This way, you’re showing the interviewer you’re able to come up with a naive solution to the problem, identify its weaknesses, and find ways to improve it.

There are a couple ways to identify optimizations:

Try simplifying the problem, seeing how to optimize the basic version, and applying that to the problem at hand. Look over your design for repeated, superfluous work, and think about how to minimize it.

Think about what sort of data structures are best designed for the problem and try to integrate them into your solution. For example, maps are optimized for lookups, heaps are optimized for sorting, etc.

Once again, communication is key! As long as you’re thinking out loud and asking clarifying or leading questions, it’s easier for the interviewer to understand your solution and even to help you. Once you and the interviewer are satisfied with the solution you’ve designed, it’s finally time to start writing code.

Time Management: One of the biggest challenges with technical interviews is time management. While it’s always good to spend time designing the perfect solution, make sure you don’t end up in a situation where you don’t have time to implement it. Keep track of time and give yourself at least half the interview to actually write and debug your code. It’s often better to implement a naive solution and keep working on the optimization in any remaining time than it is to run out of time in the middle of trying to implement an optimal solution.

Code Quality: Writing good, clean code will always win you an interviewer’s approval, whether you’re writing it on a computer or whiteboard. Good coding practices include:

Abstracting out reusable sections of code into functions

Writing meaningful variable and function names

Adding input checks and null checks

This will both make it easier to identify any potential bugs in your code later on and help the interviewer understand your work.

Assumptions: It’s perfectly acceptable to make assumptions, as long as you explain them! It would be unreasonable to expect you to remember every detail of a language or implement every common data structure or algorithm within the limited time given. Unless a component’s implementation is vital to solving the problem, the interviewer will often allow or even expect you to abstract out some details. However, it’s important to clearly state and explain your assumptions. For example, rather than implementing a helper function, you can just design the method signature, explain how and why you will use it, and move on.

Testing your code is one of the most important parts of software development. Focus on good practices and a correct, bug-free solution instead of the speed at which you can finish the problem.

Take time to reread your code line by line and look for any glaring bugs.

Come up with a few basic test cases and step through your code one line at a time.

Make note of what is happening at each line.

Write down key variable values.

Make sure you get to the expected answer.

Finally, play devil’s advocate by trying to break your solution, focusing on:

corner cases

unexpected input formats and types

error or exception handling, system reliability, etc.

You don’t have to actually implement or even come up with a solution to all such problems, but it will show your interviewer you’re thinking about the limitations of your code and how to improve it.

There is a lot more to a technical interview than just coding up a solution. Another key factor an interviewer is looking for is how they’d work with you as a teammate. Sometimes a candidate who needed some help but showed a lot of strengths in their design and development process might be rated higher than a candidate who quickly got to the right solution on their own but didn’t show a penchant for planning their work or testing their implementation.

Your problem solving and coding skills are your ticket to passing a technical interview. However, the coding question isn’t the only way to make a good impression. Everything from your introduction to the questions you ask can help you get the most out of an interview.

Asking The Right Questions

Indy Prentice, Engineer

In addition to the technical questions, most interviewers leave time at the end for you to ask your own questions. Though this is another chance to make a good impression, the most important thing is that you get your questions answered.

Even if you feel your interview covered your questions, use your research to prepare additional questions to demonstrate your values and interest in the company. This not only shows the interviewer you’re serious about the opportunity and excited to learn more, but also allows you to evaluate if the company is a fit for you. Spend some time ahead of the interview reflecting on what’s important to you, such as team diversity, work/life balance, opportunity for impact, participation in the open-source community, or working with designers. This is your chance to evaluate whether the company you are speaking to fits the bill!

In addition to value-driven questions, there are plenty of generic questions you can ask any interviewer to gain additional information about the company and start a conversation around that topic. These questions can center around your research or the interviewer’s role.

Some examples are:

What’s a typical day like for you?

What are your favorite and least favorite things about your job?

Why did you choose to join, and why have you stayed?

To help make the most of your time and the interviewer’s, make sure the questions you ask are best suited to that person. Questions should be within the engineer’s experience or area of expertise and be appropriate for discussing with a stranger.

For example:

At the end of your interview, you may still have additional questions for your interviewer. Unless they offer their contact information where you can follow up, it’s best not to put them on the spot by asking for it. Instead, you can go through the recruiter to find out the best way to follow up.

While your technical performance helps determine your candidacy, an interview is looking for employees beyond just those skill sets. At Pinterest, we look for more than strong engineers. Our team is made up of people who are excited about the product, technical challenges, and the values important for living well-rounded lives. Ultimately we’re looking for people who will stay and be happy at Pinterest. Engaged candidates who have some reason for wanting to come here, whether that’s the product or the technical challenges, are the most exciting.

Use your time as a candidate to find the company that fits you. Making the most out of the non-technical aspects of the interview can ensure that you and the company are a good match!

We have a growing list of open roles for our engineering team. If you’re interested in learning more about working at Pinterest, check out our Careers Page!