Microsoft Interview Questions | Glassdoor

Companies matching "Microsoft"

Microsoft Interviews

www.microsoft.com /  HQ: Redmond, WA

5,036 Interviews

3.1 Average

Microsoft Theater Interviews

www.microsofttheater.com /  HQ: Los Angeles

1 Interviews / Part of AEG

1.0 Very Easy

MIC Brussels Interviews

www.mic-brussels.be /  HQ: Bruxelles

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

3 Answers

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

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 very large existing network with thousands of external connections, how would you add an additional few hundred connections?

3 Answers

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

2 Answers

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

2 Answers

What have you done to keep up with technology since your last position?

2 Answers

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

31 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,892 Interview Questions