# Microsoft Interview Experience | Set 55 (For Software Engineer 2)

Skype round 1: (10 min)
Print a tree in zigzag order. For Example for the given input tree:-

```                1
2        3
4        5 6        7 ```

The output would be:-

```1
3 2
4 5 6 7 ```

Code for the logic in any language that you are comfortable in.

Skype Round 2: (10 min)
Find if two given strings are anagrams of each other or not.
Anagrams example: LISTEN and SILENT.
Code for the same. Test cases for the code. (Positive and negative)

They called me to Hyderabad for an F2F immediately after Skpe rounds, (I managed to postpone it to the next week).

Face2Face Round 1: (45 min)

Question 1:
Given a character array which each position is filled with either a single digit numbers or a comma,
Array of 22 characters:-

Write a code to reply true if we find a set of three set of numbers separated by a comma such that
X , Y, Z and Z = X + Y
In the array above 77+22 = 99 so return true.Code for the same with negative test cases.

Question 2:
If in a given Doubly Circular Linked List a couple of next pointers are corrupted, give the logic to rectify them all.

Face2Face Round 2: (1 hour)

Given a number in an int variable, write a code print its value in words, covering all possible corner cases.
Ex → 34567 = thirty four thousand five hundred and sixty seven.
Negative test cases for the same.

Face2Face Round 3: (1 hour 15 min)

Question 1:
Given a scheduler arrangement with some jobs having unique job ids and every job id has a number of tasks with unique task ids for that job.
Example:-

``` Job id : 500    Task id : 700
Job id : 600    Task id : 400
Job id : 1000    Task id : 800
Job id : 200    Task id : 650```

Write a Code for listing the job ids + task id combination in round robin fashion.
Example:-

```Job id : 500    Task id : 700
Job id : 600    Task id : 400
Job id : 1000    Task id : 800
Job id : 200    Task id : 650
Job id : 500    Task id : 300
Job id : 600    Task id : 350
Job id : 1000    Task id : 100
Job id : 500    Task id : 350
Job id : 600    Task id : 600```

Choose any data structure of the input (array of structures or linked lists or queue).
Design Test cases for the same.

Question 2:

Given a BST, create a Doubly Linked List from the same in place.
Tree node -> left pointer = DLL node -> previous pointer
Tree node -> right pointer = DLL node -> next pointer

Face2Face Round 4: (with the Director) (1 hour approx)
He asked typical HR questions like
Why Microsoft?
Where do you yourself 10n years from now? Blah blah.

Question 1:
Given a mess of 3 balls (colored red blue and white) write an algorithm + program with the most efficient way to sort them color wise. (Dutch National Flag Problem)

Question 2:
Given a string print the string with alternate occurrences of any character dropped.

```Example:-  input string    → It is a long day Dear.
Output string → tisalongdyDea. ```

Modification:- Consider alphabets with both cases as same occurrence.

`       Output string → Itsalongdy ea.`

Position was software Engineer 2. MSFT does not have SDE and SDET anymore, All roles shall be SE from now on.

Thank you geeks for geeks. This site is a Marvel for job aspirants.

If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.

## Related Practice Problems

Write your Interview Experience or mail it to contribute@geeksforgeeks.org

My Personal Notes arrow_drop_up