Related Articles
Microsoft Interview | Set 37 (For SDE-1)
• Last Updated : 17 Sep, 2014

Skype round:
1) Print the last n lines of a file (Hint : treat it like a linked list)
2) Length encoding –
Input: aaabbc Output: a3b2c1

F2F round 1:
1) Given a few points in first quadrant – (x1,y1) …..(xn,yn) and given another set of points (a1,b1…..an,bn), determine whether all the points (a1,b1…an,bn) have already occured in (x1,y1)…..xn,yn)

2) Given a graph where every two nodes are either friends or enemies with each other. Find a way to go from one node to the other.
Restrictions:
1) You can also travel from one node to next if they are friends with each other
2) You have some “magic potions”. You can convert an enemy path to a friend path with a magic potion.

Find the path with min number of magic potions required.

F2F round 2:

1) Discuss one good, one bad feature of facebook. How you will redesign it to improve it?
2) Implement auto complete.
3) Given numbers a1…an find the minimum index, whose element occurs twice in the array. Do it in one pass of the array ( or less that O(n) if possible?)
e.g 3 2 4 4 2
Output : 1 (is the lowest Index) since, ‘2’ repeats twice.