A coding interview can be nerve-racking, but it’s an essential part of the technical interview process to demonstrate your programming skills and knowledge of coding concepts. While the exact questions a technical recruiter might ask vary depending on what kind of role you’re applying for, there are some common coding interview questions you can prepare for to ace the interview. We’ll cover:
- Programming Interview Questions
- Conceptual Coding Interview Questions
- General Coding Interview Questions
Programming Interview Questions
A coding interview typically starts with an assessment of your computer programming skills. This assessment might be a whiteboard challenge or coding test.
What Is a Whiteboard Challenge?
A whiteboard challenge is when you’re given a coding challenge during a live interview. You solve the problem in front of the interviewer and explain your process as you work on the challenge.
You can use the UMPIRE method to approach these problems:
U: Understand the problem
M: Match the problem with the interviewer
P: Plan your approach and solution
I: Implement your solution
R: Review your solution
E: Evaluate your solution
To prepare for a whiteboard challenge, “practice talking through your problem-solving process,” says Archie Payne, president of CalTek Staffing, an IT and technical staffing firm. “Interviewers don’t just want to see that candidates can complete the test task, they also want to get insights into how candidates approach the process. A good way to prepare is to pretend you’re teaching a programming class, and practice how you’d explain and demonstrate key concepts to someone who doesn’t know them.”
It’s less about solving everything right the first time (or even at all) and more about learning how you approach problems and solve challenges.
And what happens if you don’t know the answer? Don’t panic.
“Be honest that this is a gap in your knowledge,” Payne says. “Take a moment to think critically about the problem and the ways you’d likely approach it, then explain that process to the interviewer. Hiring managers don’t necessarily expect entry-level candidates to have all the answers, but they do want to hire someone who’s self aware about what they do and don’t know, and willing to learn and try new things.”
What Is an Independent Coding Test?
An indepdent coding test focuses on your ability to code and solve problems within a given time frame. You may have an independent coding test after your whiteboard test or before as part of a screening.
The company will give you a link to a common code editor, and you can choose what programming language you want to write in. Before you start the test, you’ll know how long you have to complete it and whether you’ll be able to leave the platform during the test. Make sure you do the test in a quiet environment where you won’t have distractions.
To prepare for this part of the interview, “simulate interview conditions,” Mohit Maheshwari, co-founder at NMG Technologies, a full-service IT company, says. “Practice coding on a whiteboard or a blank sheet of paper, as this is how you will be doing it during the interview. Get used to writing code without the aid of an IDE [integrated development environment] or compiler.”
JPMorgan Chase Software Engineering
Practice basic programming skills with a Python project.
Avg. Time: 5 hours
Skills you’ll build: Python, Git, React, Typescript, technical communication
Common Programming Interview Questions
What questions will you get in a whiteboard challenge or independent coding test? Here are some examples:
- How do you reverse a string?
- How do you determine if a string is a palindrome?
- How do you calculate the number of numerical digits in a string?
- How do you find the count for the occurrence of a particular character in a string?
- How do you find the non-matching characters in a string?
- How do you find out if the two given strings are anagrams?
- How do you calculate the number of vowels and consonants in a string?
- How do you total all of the matching integer elements in an array?
- How do you reverse an array?
- How do you find the maximum element in an array?
- How do you sort an array of integers in ascending order?
- How do you print a Fibonacci sequence using recursion?
- How do you calculate the sum of two integers?
- How do you find the average of numbers in a list?
- How do you check if an integer is even or odd?
- How do you find the middle element of a linked list?
- How do you remove a loop in a linked list?
- How do you merge two sorted linked lists?
- How do you implement binary search to find an element in a sorted array?
- How do you print a binary tree in vertical order?
Forage Find
LeetCode is a great resource for practicing these types of questions. You can create a free account and practice hundreds of coding questions you might get in an interview.
Conceptual Coding Interview Questions
The recruiter or hiring manager will also ask conceptual coding interview questions to learn whether you’re familiar with the concepts you’ll be working with.
“Expect questions on basic data structures such as arrays, linked lists, trees, and graphs, as well as common algorithms like sorting and searching,” Maheshwari says.
To prepare for these questions, refamiliarize yourself with these concepts. Then, you can practice by explaining them clearly to someone who doesn’t have technical knowledge.
Examples of these questions include:
- What is a data structure?
- What is an array?
- What is a linked list?
- What is the difference between an array and a linked list?
- What is LIFO?
- What is FIFO?
- What is a stack?
- What are binary trees?
- What are binary search trees?
- What is object-oriented programming?
- What is the purpose of a loop in programming?
- What is a conditional statement?
- What is debugging?
- What is recursion?
- What are the differences between linear and non-linear data structures?
>>MORE: Learn explanations of common software engineering technical concepts with entry-level software engineering interview questions (and answers).
General Coding Interview Questions
Outside of programming questions and questions about technical concepts, you might answer questions about your general experience, like how you learned to code, behavioral interview questions, and how you keep your skills fresh.
Examples of general common coding interview questions include:
- What programming languages do you have experience working with?
- Describe a time you faced a challenge in a project you were working on and how you overcame it.
- Walk me through a project you’re currently or have recently worked on.
- Give an example of a project you worked on where you had to learn a new programming language or technology. How did you go about learning it?
- How do you ensure your code is readable by other developers?
- What are your interests outside of programming?
- How do you keep your skills sharp and up to date?
- How do you collaborate on projects with non-technical team members?
- Tell me about a time when you had to explain a complex technical concept to a non-technical team member.
- How do you get started on a new coding project?
“Be prepared to explain your expertise in the languages you know and what types of projects you’ve completed using them,” Payne says. “The ability to troubleshoot and correct issues as you go is a key skill for programmers at all career levels. The best answer will focus on the steps you take to diagnose and fix issues, rather than the intricate details of the specific problem you’re describing.”
Common Coding Interview Questions: The Bottom Line
Programming interview questions generally come in three different forms: practical coding tests, questions about technical concepts, and general questions about your experience. To ace a coding interview, prepare carefully for each section: practice problems, review concepts, and use the STAR method to shape answers about your experience.
Are you getting ready for a coding interview? Practice sample coding problems with matrices and arrays and learn what hiring managers look for in technical interviews with Girls Who Code’s Technical Interview Prep.
We asked students who got hired at JPMorgan, Bank of America, Wayfair, and Walmart to share their top tips on what actually works to get a finance or software engineering internship:
Image credit: Canva