Microsoft L-59 HackerRank OA question || OA

Result
Offer
Posted
16 Aug 2025
281 reads

Summary

Had a successful interview experience at Microsoft for the L-59 HackerRank OA position. The interview focused on a challenging string manipulation problem that required careful analysis of the operations allowed.

How it went

I recently had the opportunity to participate in the Microsoft L-59 HackerRank OA interview. The process was quite challenging but rewarding. The main problem I encountered was about performing a series of operations on a string to maximize the number of operations that could be applied. The problem required a deep understanding of string manipulation and the conditions under which the operations could be performed.

Questions asked (1)

  1. 01

    Maximum Operations on a String

    Data Structures & Algorithms · Hard

    We are given a string s (3 <= len(s) <= 2.10^5 ) of lowercase English letters. We can repeatedly perform the following operation:

    Pick three consecutive characters s[i], s[i+1], s[i+2] (1-based index) such that:

    - s[i] = s[i+1]
    - s[i+1] ≠ s[i+2]
    - Replace s[i+2] with s[i].

    We need to find the maximum number of operations that can be applied.

How they prepared

For the interview, I focused on practicing string manipulation problems and understanding the conditions under which certain operations can be applied. I also reviewed similar problems to build a solid foundation in algorithmic thinking.

Know someone preparing? Send it to them:WhatsAppLinkedInX

Interviewed at Microsoft recently?

Write up your rounds while you still remember the questions. It helps the next person more than you would think.

Share your experience
Discussion 0

Questions for the author, or how your own interview compared.

Join the discussion

Sign in with Google to comment or ask the author a question.

No comments yet

Be the first to share your thoughts and start the discussion!