What To Expect From a Coding OA
Congrats, you’ve received a coding assessment! Now what?
What is an online coding assessment?
An online coding assessment is a test that companies send to job applicants to see how well they can code. It usually has 2 to 4 Leetcode-style coding questions that can be easy, medium, or hard. You will complete these tests on websites like HackerRank or CodeSignal, which let you write and run your code. The system checks your answers, and your results are sent back to the company.
When do you get one?
The coding assessment is usually the first step in the interview process. This means you either passed the resume check, or every person who applies to that company has to take one. It's very important to prepare because this test helps the company decide who moves on to the next step before you get to talk to a real person.
You will get a link in your email that takes you to a website to do the assessment. Usually, you have one week from when you get the email to finish it. You can start the test anytime during that week, but once you begin, you'll have a time limit to complete it.
Scoring
Your code will be scored based on how many test cases it passes, how efficient it is, and sometimes how you have organized your answer. Each website has its own way of scoring your answers. Here's a quick look at how scoring works on HackerRank and CodeSignal.
Length
Your online assessment can take anywhere from 1 to 4 hours. Sometimes, you might finish in 30 minutes, but other times it could take the full 4 hours. It mostly depends on how many questions there are and how hard they are.
How do I prepare?
Leetcode
Since the questions are similar to Leetcode, you should practice on Leetcode to get ready. It’s best to start practicing long before you get your first coding assessment.
Familiarize yourself with the platform
HackerRank and CodeSignal both have practice questions. Try some before your assessment so you know how the website works, how to run your code, and how to check your answers.
Review Data Structures and Algorithms
The questions in coding assessments will cover basic data structures and algorithms concepts. Make sure to know how to tackle these problems and the patterns to solve them.
Look online
You might find students sharing their experiences with coding assessments on websites like Glassdoor. Look up the company that sent the assessment to see if you can find any helpful tips from past applicants.
Cheating
Some assessments may record your screen or prevent you from looking at other tabs while you take the test. It's important not to cheat on these, even though it might be tempting. The company will almost certainly be able to tell, and you'll be automatically rejected. You might even be asked to share your screen or turn on your camera during the assessment to make sure you aren’t using outside resources (like Google and AI).
Even if you think you can find some way to get away with it - why would you want to? The online assessment is only the first step in the interview process. Once you get to the live interview, you will probably be expected to answer similar questions. It is also quite common for interviewers to ask you about your code and your thought process during the online assessment.
What happens if my code doesn’t work?
It’s wrong
First, your code might just be wrong. If that happens, you’ll see that many or all of the test cases failed. Re-read the problem and check your code for mistakes. Compare the result your code gives to spot any errors. If you still can’t find the mistake, go through your code step-by-step with a test case that failed until you find where the problem is.
Edge cases
Second, you might be missing an edge case. This means that only one or two test cases fail. Edge cases are unusual or tricky inputs, like empty values or very big numbers. If you know the edge case, you can add an “if” statement at the start of your code to handle it. As you practice more, you'll get better at spotting these special cases.
It’s too slow
Third, your code might be too slow. If you see a “time limit exceeded” error, it means your code takes too long to run with a big input. This usually happens if your code isn’t efficient enough. Try to find a faster way to solve the problem. Look into faster algorithms, like Binary Search or Merge Sort, or use data structures like Heaps and Hashmaps. There’s always a way to make your code faster!
See our resource for data structures time and space complexity: https://www.internship-playbook.com/resources/asymptotic-notation-common-operation-cheat-sheet
Hidden test cases
Hidden test cases can be tricky and are easy to get stuck on. If your code is failing a hidden test case, make sure you’ve thought about all the edge cases, like if the input is an empty list, if there’s a chance of dividing by 0, or if only positive numbers should be included in the answer. Thinking about these special cases will often help you solve the hidden test cases.
Here’s what HackerRank has to say about hidden test cases: https://candidatesupport.hackerrank.com/hc/en-us/articles/4402921138451-Hidden-Test-Cases
Going forward
Once you have completed your online assessment, there isn’t much you can do beside wait. Sometimes you will know your score and other times you won’t. Don’t get too caught up in it. However, we do recommend that you write down the problems you faced and how you solved them right after you submit your assessment. This will help you remember your thought process in case you are asked about it in the following interview.
Good luck!