microsoft Interview Questions | Glassdoor

Companies matching "microsoft"

Microsoft Interviews /  HQ: Redmond, WA

5,771 Interviews

3.1 Average

Microsoft Innovation Center Tourism Technologies Interviews /  HQ: Palma de Mallorca

0 Interviews

Not Yet Rated

Centro de Inovação Microsoft (PUCRS) Interviews

www.pucrs.brcentrodeinovacao / 

0 Interviews

Not Yet Rated

microsoft Interview Questions

Sort: RelevancePopular Date

In a given sorted array of integers remove all the duplicates.

8 Answers

Iterate the array and add each number to a set, if number is already there, it won't be added again, thus removing any duplicates. Complexity is Big-O of N

The array is already sorted, no need for a set. example: 2,2,5,7,7,8,9 Just keep tracking the current and previous and the index of the last none repeated element when found a difference copy the element to the last none repeated index + one and update current and previous, no extra space and it will run in O(n)

public RemoveDuplicates() { int[] ip = { 1, 2, 2, 4, 5, 5, 8, 9, 10, 11, 11, 12 }; int[] op = new int[ip.Length - 1]; int j = 0, i = 0; ; for (i = 1; i <= ip.Length - 1; i++) { if (ip[i - 1] != ip[i]) { op[j] = ip[i - 1]; j++; } } if (ip[ip.Length - 1] != ip[ip.Length - 2]) op[j] = ip[ip.Length - 1]; int xxx = 0; }

how can a particular application be tested apart from testing its functionality

4 Answers

Given a very large existing network with thousands of external connections, how would you add an additional few hundred connections?

3 Answers

How do you manage project expectations when multiple stakeholders are involved?

2 Answers

How do you influence people who do not report to you? How do you get them to do things even though they don't have to or want to?

2 Answers

Given a string (understood to be a sentence), reverse the order of the words. "Hello world" becomes "world Hello"

2 Answers

Write code in your favorite programming language that will accept two strings and return true if they are anagrams.

2 Answers

Devise a way to make sure there is always mlik in my fridge.

33 Answers

You are on a game show. There are three doors, behind one of which is a prize and the other two is a chunk of coal, and the host knows which door holds the prize. You choose door #1. Before it is opened, the host opens door #3 and reveals a lump of coal. You have the choice to stick with the door you chose originally or switch to door #2. What do you do?

17 Answers

Given a set of numbers -50 to 50, find all pairs that add up to a certain sum that is passed in. What's the O notation for what you just wrote? Can you make it faster? Can you find an O(n) solution? Implement the O(n) solution

17 Answers
110 of 4,888 Interview Questions