Given N points on a plane and an integer perimeter, choose the lengths of sides of a rectangle to cover the maximum number of points. The rectangle's sides should be parallel to the coordinate system axes, and the sum of their lengths should equal the perimeter. Points on the sides are considered covered.
Example: For perimeter = 10, possible rectangle sides are 1x4, 2x3, 3x2, and 4x1.
Task: Determine the maximum number of points that can be covered by the rectangle.
Given a string s and an NxN grid of characters, reconstruct s by visiting grid fields. The grid contains empty fields (".") or uppercase English letters, with each letter appearing at most twice.
Rules:
Task: Find the minimum number of moves needed to reconstruct string s.
After clearing the coding round, Round 1 and Round 2 were scheduled on the same day with a 1-hour gap.
The interviewers joined on time, asked me about myself and my work, explained to me that this will be a DSA round, and then directly jumped onto the problem statement.
Round Type: Technical - DSA
Interviewer: (Senior Software Engineer) (7+ year experience)
Problem: Rotate Matrix in clockwise direction
Follow-up 1: Implement in-place rotation
Follow-up 2: Extend the solution for MxN matrices
Problem Leetcode Link: https://leetcode.com/problems/rotate-image/description/
Follow-up 2 Solution: Add padding and then rotate the matrix (inplace), otherwise simply create a new matrix with nxm dimensions and add the elements (non-inplace)
Conclusion: I coded the solution of O(n^2) inplace and tested it on all edge cases. After which I explained the solution for follow-up 2. However, due to time restrictions, we concluded the interview. The interviewer was satisfied and wished me luck for the second round.
The interviewer joined late, spending 15 minutes discussing the problem and 30-32 minutes coding and writing test cases. He explicitly told me that I would judged based on the completion of the solution and writing test cases. Also, he asked me to follow OOP principles properly.
Round Type: Technical - LLD/HLD
Interviewer: (Senior Software Engineer) (9+ year experience)
Problem: Design Recents folder in Mac
Solution: LRU cache problem with slight modification
Requirements: Adhere to OOP concepts (Encapsulation, Abstraction, Inheritance, etc.) Implement the complete code, Write test cases covering all edge cases
Conclusion: I implemented the whole solution, and also coded a test class where I coded different unit test cases to the the solution. The Interviewer was satisfied and we concluded the interview on a good note.
After clearing both rounds, Round 3 was scheduled after 1 week gap.
The interviewer joined late again, She mentioned that this round would primarily focus on behavioral and experience-based questions, followed by a single Data Structures & Algorithms (DSA) question at the end.
We started with introductions, where both of us shared details about our work experience and current roles.
Round Type: Behavioural + Resume + Technical (DSA) (AA - As Appropriate Round)
Interviewer: (Senior Engineering Manager) (20+ year experience)
Behavioural Questions: The interviewer asked a series of questions related to my past projects, problem-solving approach, and handling challenges. Some of the key questions I recall:
After discussing these behavioral aspects, we moved on to the technical portion, where I was given a DSA problem to solve.
DSA Problem: Word Chain Problem
Given an array of strings, determine if it's possible to form a chain where each word's last three characters match the first three characters of the next word in the chain. The chain should use all words exactly once. If such a chain exists, return the sequence of words forming the chain; otherwise, return an empty array.
Example 1:
Input: ["germany", "ginger", "anyfin", "ishita", "finish", "begin"]
Output: ["begin", "ginger", "germany", "anyfin", "finish", "ishita"]
Explanation:
begin -> gin(ger) -> ger(many) -> any(fin) -> fin(ish) -> ish(ita)
Example 2:
Input: ["hello", "world", "start", "begin", "final"]
Output: []
Explanation:
No valid chain possible as no word's first three letters match with any other word's last three letters.
Example 3:
Input: ["germany", "ginger", "anyfin", "ishita", "fintsh", "finish", "begin"]
Output: []
Explanation:
Even though a partial chain is possible:
begin -> gin(ger) -> ger(many) -> any(fin) -> fin(ish) -> ish(ita)
The answer should be [] because:
Conclusion: I answered all behavioral questions properly, following a CARL (Context Action Result Learnings) pattern for each answer. For the technical round, I fully solved the Word Chain problem, implemented a correct solution, and wrote a comprehensive test class to validate edge cases.
Feedback: Microsoft was impressively quick with the entire recruitment process, completing everything within a month from the initial contact to receiving the offer letter. The interviewers were highly professional, helpful, and ensured a smooth experience throughout. The HR team was also supportive and responsive.
One thing to note is that if you are negotiating with Microsoft HR, it is essential to have a competitive offer from another company. They tend to be quite firm with their offers and are generally unwilling to negotiate beyond their initial proposal.