Microsoft | Onsite
Anonymous User
1809

Panel interview.

Each interview starts off with about 15 mins of behavioral. The usual 'describe a time when...'. Only one I've never seen before is "describe a time when you did something without your manager asking you to".

  1. https://leetcode.com/problems/flatten-binary-tree-to-linked-list/solution/

  2. Write code to represent company. 1 CEO, managers, employees, etc. A manager has a list of reports(people who work under him). Write a function to return list of all people who work under a particular manager, directly and indirectly.

  3. https://leetcode.com/problems/construct-binary-tree-from-preorder-and-inorder-traversal/

  4. Design K-V store where if you attempt to retrieve a key that isn't in the data structure, insert it with the value of the average of the 2 closest keys.
    ex.
    insert(4, 4)
    insert (99, 10)
    insert(102, 20)
    insert(180, 99)
    Now the data strucure has the above 4 K-V pairs. get(99) = 10, get(102) = 20, etc.

get(100) = 15.
The closest 2 keys to the key of 100 are 99 and 102. Their corresponding values are 10 and 20 respectively. avg(10,20) = 15. Now the data structure contains the K-V pair (100, 15)

Comments (7)