Microsoft
All four rounds followed a similar format: 30 minutes discussing past experiences and behavioral questions, followed by 25 minutes to answer a coding question. The final 5 minutes were allotted for questions from the candidate.
Round 1 Search in Rotated Sorted Array
Round 2 A shop maintains a visitor log/journal. The shop is open daily from 6 AM to 11 PM. For each customer, entry and exit times are recorded. At the end of the day, determine the hour with the maximum number of customers.
Example Input: P1: 0700-0800 P2: 0800-1100 P3: 0700-1000 P4: 0900-1000
Output: 0900 to 1000 (since P2, P3, P4 are present)
Round 3 The problem involved a double binary search; the details are unclear at this time.
Round 4 Swap matrix quadrants. Swap Q1 with Q4 and Q2 with Q3.
All rounds were successfully completed, and an offer was extended.