Practice 30 Microsoft Software Developer interview questions covering algorithms, system design, and coding assessments.
Question 9 of 30
How to Answer
Example Answer
Community Answers

William Swansen has worked in the employment assistance realm since 2007. He is an author, job search strategist, and career advisor who helps individuals worldwide and in various professions to find their ideal careers.
This is a common Microsoft interview question asked of software developers. On the one hand, the speed of sorting can depend on the environment in which the sorting is done, and on the other hand, it can depend on the type of items that are sorted and the distribution of these particular items. For example, if you are sorting an extensive database that cannot fit into memory all at once, this would be quite different from sorting an array of 100 integers. Adding to that, not only will the implementation of an algorithm be quite different, but it may even be that of the same algorithm. It might also help to know the five Sorts that will likely be brought up in an interview. They are: Quick Sort, Insertion Sort, Shell Sort, Heap Sort, and Merge Sort. Study them and research examples of how they are used and the differences between them. I will give examples that you can use here as well.

William Swansen has worked in the employment assistance realm since 2007. He is an author, job search strategist, and career advisor who helps individuals worldwide and in various professions to find their ideal careers.
"One of the first things I do before making any comparison is to use a test environment to test the speed of the different sorting algorithms (Comparison and Non-Comparison) in this case. I test each algorithm several times for randomly generated arrays to gather the most accurate data before proceeding to the next step in the process. The next step is to look for random numbers between 0 and 10 times the array size to create array content. I may or may not do a high-repetition test with numbers between 0 and 1/100 times in the same context. After I do this, the results may come back as completely random, sorted, or reversed. I will also run some test-cases to determine the number of repetitions from low to high for each value if the array repeats."

Interview Coach
Jaymie
A real coach, not AI. I read every answer myself and write back with personalized feedback.
Typically responds within 24 hours.
0 - Character Count
Unlock expert responses shaped by Microsoft's rigorous technical interview process.
Get StartedJump to Question

Written by William Swansen
30 Questions & Answers • Microsoft

By William

By William