Coding Interview Preparation

A coding interview is designed to help an organization evaluate a candidate’s knowledge of coding algorithms, data structures and common software development terms (e.g., binary trees, strings, arrays, queues, graphs, linked lists).

Although interviews of this nature do not reflect the typical day-to-day work environment of a software developer or engineer, the ability to think through problems, develop solutions, and craft plans to test and implement them are central to coding-heavy professions.

Coding interviews are often the first step in the interview process, but can also occur at later stages of the process. Many hiring processes include multiple rounds of technical interviews.

What traits are firms seeking in candidates?

Candidates must be able to demonstrate their coding ability during an interview. Organizations hiring for technical roles want to see that you can think through a problem, craft a response and review/test your code. Being able to articulate your design and execution process—sometimes in a self-directed, timed environment—is key.

What does the tech interview look like?

The technical industry is unique in that successful interviewing requires having specific, specialized knowledge. Organizations often assess this knowledge at the first stage of the interview process, saving questions about your interests, personality and experience for future rounds. 

A coding interview generally takes one of two forms: a timed, self-directed test or a live coding session with an interviewer. Unless the role for which you are interviewing requires knowledge of a specific programming language, you are typically free to complete the assessments in the programming language of your choice. 

What types of interviews are there?

Self-directed timed test

These are typically 30-60 minutes of continuous assessment. Since you can't start and stop, plan ahead to ensure you have time set aside, a quiet place to work and that your technological needs (e.g., fully charged laptop, strong and stable internet connection) are met.

Organizations may use established platforms such as HackerRank and CodeSignal or have their own proprietary software. Your test might include following prompts on a screen or writing out code offline and uploading it within a given time period.

Submissions are not typically reviewed in real time and it may be several days or weeks for an organization to decide if you are technically proficient. If you pass this test, you will be contacted by a company representative for one or more interviews to talk about your thought process during the test, your general aptitude for technical problem solving, and how your personality and interests align with the organization.

Live with interviewer

Typically this is a 45-60-minute conversation (in person or virtually) with a technical interviewer asking a series of programming problems. Using pen and paper, markers and a whiteboard, or an online collaborative editor (CoderPad/CodePen/Google Docs), you will perform calculations and write code in real time.

It is important that you talk through your thought process as you go. The primary reason interviewers conduct this type of interview is to better understand how you think, approach a problem, set up your program and determine it would work.

Some behavioral questions may emerge during the interview, but the majority of the time will be focused on coding. In one or more subsequent interviews, the interviewer(s) will ask questions that more thoroughly assess how your personality and interests align with the organization.

What are common pitfalls to avoid in interviews?

Tendency to rush

  • Slow down and think through the question first, as there may be multiple steps to follow or specific details to account for.
  • Build in a process for testing your code. Even in real-world programming, no one gets it right on the first try. A skilled developer knows they have to check their work. 

Fear of asking questions

  • There’s likely something you don’t know or information in an interview prompt may be missing or misleading.
  • Show your interviewer that you are astute and inquisitive by asking questions.

Getting flustered

  • Don’t sit in silence and panic if you’re faced with unfamiliar content. Acknowledge if what you’re looking at is new or a concept you only briefly studied in class.
  • Speak with the interviewer, working through the prompt with them so they see how you process new information.
  • If a misstep is brought to your attention by an interviewer, gracefully acknowledge it and incorporate their feedback. Displaying coachability is an important quality!

What are ways to prepare for interviews?

Self-Directed Coding

There are many resources that offer lessons and platforms for developing your own coding projects in a variety of programming languages. Popular options include:

  • LinkedIn Learning: 5,000+ on-demand courses at no cost to the Princeton University community
  • Udemy: Video courses on a range of topics. Search a topic like “Python programming” and use the price filter to select the ones that are free.
  • FreeCodeCamp: A nonprofit organization whose mission is to help people learn to code for free. 

There are also a couple of opportunities to collaborate on coding with classmates at Princeton:

  • HackPrinceton: Meet fellow hackers from around the world, learn new skills, and work alongside seasoned mentors to collaborate and build out brilliant, innovative and impactful ideas.
  • Princeton Competitive Programming: Strengthen problem solving skills, learn new algorithms and data structures, practice coding and prepare for tech interviews. Events are hosted weekly.

Practice Questions for Coding Interviews

Entering “coding interview prep” in any search engine will yield many videos, podcasts and documents offering tips and advice. Be cautious as you explore these tools, as some are free snippets serving as advertising for paid products.

Content on sites like Quora, Reddit and Glassdoor are populated by group members and may not accurately reflect the material covered or conditions under which your interview will take place.

Examples of reputable sites favored by Princeton students include LeetCode, HackerRank and Neetcode

Other Helpful Resources

A few popular tools include:

  • Cracking the Coding Interview 6th ed. (2020) by Gayle Laakmann McDowell
  • Interviewing.io: Contains helpful interview guides, resources (organized by company, programming language, and technical topic), mock interview replays, and more.
  • Google Tech Dev Guide: A library of popular computer sciences resources, interactive tutorials; and interview preparation tools.