Microsot Interview for SDE II, Redmond, WA Technical Screen: Was asked two questions, 1.Maximize Distance to Closest Person (gave a 2 pass solution, interviewer was satisfied) 2. Longest Substring with At Most K Distinct Characters (sliding window solution)
Onsite (4 virtual rounds, mix of coding and past experience) Round 1: Given list of strings (city names with codes), output them in sorted order based on name and integer value of code.
Round 2:
Find value of middle node of linked list. For linked list with even no of nodes, return mean of the 2 middle nodes. (slow and fast pointer solution)
Given a binary tree, check if the left and right subtrees are mirror images. This was easy, but I gave a non optimal solution. Ran out of time before I could improve.
Round 3:
Round 4: Reorganize String Gave a non optimal solution using sorting, and ran out of time before I could improve the solution.
Overall, I felt the questions were doable, but I hadn't solved enough Microsoft tagged questions and couldn't come up with the best solutions in some cases. I'm not sure what solution the guy was expecting for the max stack question though. Most probably, will get a reject. I had already accepted an offer at another company, and was interviewing just for the experience.