Microsoft Codility Test (OA) Practice [2022]


Hi, I'm David, JobTestPrep's expert for Microsoft's SDE Assessment Tests. Have a question? Feel free to send me an email at any time.

What is a Codility Test?  

Codility is a coding platform that Microsoft uses for its Online Assessment. The Microsoft Codility Test is an online programming exam, that is later reviewed by a Microsoft (MS) reviewer. On this test, you will typically receive a combination of 3 questions to be solved in 60-90 mins.

The Microsoft Online Assessment, also called the Online Technical Screen (OTS), is one of the first stages of the hiring process for software engineer roles. It will mostly involve a Codility exam, a phone interview, or both. 


What is the passing score for Microsoft’s Codility Test?  

Your code will be graded automatically depending on its efficiency with all possible inputs: 

  • 100% = Automatic Pass 
  • 60% and below = Automatic Reject 
  • 60%-100% = Code goes through a review by a MS reviewer.  

When reviewed, your code will be assessed based on how optimal it is, and on your understanding of the solution.  


What questions will you be asked on the Microsoft Codility test?  

Microsoft online test questions will generally assess basic algorithm and data structure knowledge. 

On the Codility test question types may be:  

  • Debugging Questions 
  • Coding questions that require implementing data structures and algorithms (Strings, Binary Trees, etc.)  
  • MCQ (multiple choice questions) 
    For Ex. How many comparisons do you need to find the minimum value on a 5-element array? 
    Answer: (n-1)(4)

You will also be expected to answer computer subjects:  

  • Operating systems  
  • DBMS 
  • Computer Networks 


These are Microsoft’s most common question topics

  1. Arrays/ Strings (most frequent)
  2. Linked lists 
  3. Binary trees  
  4. Search/ Sort 
  5. Dynamic programming  
  6. Bit manipulation  

Covering all these topics may seem like a lot, but practicing the most common Microsoft coding questions saves tons of time and effort.  


Here is how a Microsoft Online Assessment question looks like on our prep course:  

Codility test example question


Microsoft Codility Test Questions

Try solving some of the most popular Microsoft online assessment questions available on our prep course:

1. Bubble Sort

Given an Integer N and a list arr. Sort the array using bubble sort algorithm.



N = 5

arr[] = {4, 1, 3, 9, 7}


1 3 4 7 9

2. Search an Element in Sorted and Rotated Array

Given a sorted and rotated array A of N distinct elements which is rotated at some point, and given an element K, find the index of the given element K in the array A.



N = 9

A[] = {5, 6, 7, 8, 9, 10, 1, 2, 3}

K = 10

Output: 5

Explanation: 10 is found at index 5.

3. Longest Consecutive Subsequence

Given an array A of integers, find the length of the longest sub-sequence so that elements in the sub-sequence are consecutive integers. The consecutive numbers can be in any order.


Input: N = 7, A[ ] = {1, 9, 3, 10, 4, 20, 2}

Output: 4

Explanation: The subsequent 1, 3, 4, 2 is the longest subsequence of consecutive elements.

4. Kadane's Algorithm

Given an array arr of N integers, find the contiguous sub-array with the maximum sum.



N = 5

Arr[ ] = {1, 2, 3, -2, 5}



 Answers to these Microsoft Codility questions are available on our full Prep Course. 

What programming language will you be using on Codility?  

You’ll be given the option to choose your preferred programming language before you begin the test. Similarly, with our Prep Coursechoose the language you most prefer to code with (C++, Java, Python, or Javascript), and start practicing. 


Is Microsoft’s Codility test hard? 

Microsoft’s coding interview questions are easy-medium level on the first round Codility test or phone screen. Their difficulty level also depends on your level of experience and the specific role you’re applying for.  

The main challenges here are:  

  • Working under time pressure.  
  • Not being able to tell the interviewer your thought process directly. 

Because of this, many people finish this test with blank answers and fail to pass Microsoft's code review. 

Do you still have questions about Microsoft's Codility test? Check these Codility test FAQs


How to Prepare and Pass Microsoft’s Codility Test?

Learn how not to leave any blank questions because of time constraints

It may be difficult and sometimes unrealistic to come up with the optimal solution for all coding questions given to you under time limits.

  • Track your speed and work on solving questions more quickly.
  • Learn your speed limits so you could manage your time and divide it between questions on the actual Microsoft Codility test.
  • Take timed OA simulations to reduce stress when coding under time pressure. 

Practice data structures and algorithms thoroughly

Practice commonly asked Microsoft online assessment questions (Arrays, Linked Lists, Binary trees, Search/Sort, and more) to be prepared for any type of question that may appear on the test. The more programming questions you'll solve, the better prepared you'll be.

Save time and effort by practicing questions specific to Microsoft interviews

Practicing the vast number of coding questions available on the web may take a lot of time and energy. Practice relevant coding questions that are specifically based on questions from Microsoft interviews to get the most of your practice time. 

Approach new problems efficiently

Practice many questions and their full solutions to develop your ability to:

  • Ask important clarification questions
  • Consider different and alternative solutions for the same problem
  • Approach new problems more smoothly and with more confidence

Our prep course can help.

In our preparation pack, you’ll get access to a thorough prep course covering all question types found on Microsoft’s actual Codility test.  

This includes: 

  • 312 Data Structure and Algorithms questions with full solutions 
    Covering Microsoft's most common questions on arrays, linked lists, Binary trees, Search/ Sort, Dynamic programming, and Bit manipulation.
  • 4 programming languagesC++, Java, Python, JavaScript. 
  • Possible hints for each question 
  • Video explanations on some main topics’ questions. 
  • Reading material and MCQ based quizzes for core computer subjects commonly asked by Microsoft: Operating Systems, DBMS, and Networking 
  • A time recorder for each question, so you could keep track of your coding time and practice your time management skills. 
  • 10 Coding Assessments simulating the Microsoft Codility test (in the form of coding contests).
  • 4 simulations of the on-site virtual rounds (mock tests) based on actual Microsoft interview experiences.

All on one online coding platform.  


Important Tips for Microsoft’s Online Assessment  

  1. Communicate your thought process
    It is important to Communicate your rationale and write comments during the OA. This is especially important for Microsoft’s First Round OA since it may not involve personal interaction with the reviewer. Here are a few tips for that:
  • Speak about what you're doing out loud as you solve each coding problem.
  • Use clear and formal coding concept names when making comments.
  • Use logical sequences to build your explanations.
  1. Ask clarification questions
    If possible, the first step when approaching a problem should be asking important (but not excessive) clarification questions. What if you can’t ask any questions? No problem. Write your questions in a comment, along with the appropriate adjustments that are needed for each case scenario.
  1. Describe the efficiency of your code
    Show the reviewer you fully understand your solution by commenting on your code’s time and space complexity, as well as benefits and drawbacks.
  2. Try using the Codility platform
    Take the Codility sample test to boost familiarity with the coding platform and reduce stress on the Microsoft Codility test. Note that Codility test questions are usually quite different than the types of questions asked by Microsoft.


Microsoft Codility Test FAQs 

How can I access the Codility test?

You’ll receive a link 1-2 days before the scheduled interview. Feel free to open the link and read the instructions, this doesn’t mean you’ll have to start the test.  

Will I have to turn on my camera?

Codility usually requires turning on your camera, so be sure to be fully dressed, and if you thought about cheating - you may want to reconsider that. 

Can I google during the Codility test?

You can use websites and books unless instructed otherwise by the recruiter.  

What will happen once I hit “start the test”?

You will not be able to stop the timer. Your code will be saved automatically throughout the test, even if you close the browser window and open it again.  

Is the Codility test recorded?

Codility Usually records the whole history, including runs and corrections. This does NOT mean you have to be perfect- the opposite is true. Mistakes tell the reviewer about your ability to work your way to the solution.

Could I go back and change my code?

When finishing a coding task, clicking “submit” will not allow you to go back and modify your code.  


Applying for Other FAANG Companies?

Make sure you visit your thorough prep guides for the Google Software Engineer Interview and Amazon Online Coding Assessment.

Microsoft, Codility, and other trademarks are the property of their respective trademark holders. None of the trademark holders are affiliated with JobTestPrep.