Contribute OA questions
OAHelper
CompaniesProblemsTopicsInterview Experiences
Explore
M

Microsoft

sde

Interview Date

21-08-2026

Result

Rejected

Difficulty

Easy

Rounds

02

Drive Type

Off-Campus

Interview Date

21-08-2026

Result

Rejected

Difficulty

Easy

Rounds

02

Drive Type

Off-Campus

Topics asked

dsa

Detailed experience

## Question 1: Budgeted Workload Smoothing Concepts:** Sliding Window, Ordered Map / Multiset Problem Statement:** You are given an array of positive integers `workload` representing the daily processing hours of a server, and an integer `budget`. In a single operation, you can decrease the workload of any specific day by `1` (at a cost of `1` from your budget). You cannot decrease a workload below `0`. Return the maximum length of a contiguous subarray where, after applying at most `budget` operations optimally, the absolute difference between the maximum and minimum elements in that subarray is at most `1`. Test Case:** *Input:** `workload = [4, 5, 8, 5, 4]`, `budget = 2` *Output:** `3` *(By spending 2 budget to decrease the '8' to a '6', the subarray `[5, 6, 5]` has a max of 6 and a min of 5, with an absolute difference of 1)* - ## Question 2: Resource Allocation Parity Concepts:** Prefix State Masking, Hash Map Problem Statement:** You are given a string `resources` consisting only of the characters `'A'`, `'B'`, and `'C'`, representing three different types of allocated resources. A contiguous substring of `resources` is considered "balanced" if it strictly meets both of the following conditions: The total number of `'A'`s in the substring is exactly equal to the total number of `'B'`s. The total number of `'C'`s in the substring is an even number (0 is considered even). Return the length of the longest balanced contiguous substring. If no such substring exists, return `0`. Test Case:** *Input:** `resources = "ACBACBA"` *Output:** `6` *(The substring "ACBACB" starting at index 0 contains two 'A's, two 'B's, and two 'C's, satisfying all conditions)* - ## Question 3: Tri-Segment Reliability Concepts:** Prefix/Suffix Arrays, Greedy Optimization Problem Statement:** You are given an array of integers `reliability` of length `n` (where `n >= 3`). You must partition the array into exactly three contiguous, non-empty subarrays (left, middle, and right). The "network score" of a specific partition is defined as the sum of the minimum elements from each of the three subarrays. Return the maximum possible network score you can achieve by choosing the optimal partition boundaries. Test Case:** *Input:** `reliability = [4, 1, 3, 2, 6, 5]` *Output:** `10` *(Partition the array into `[4]`, `[1, 3, 2]`, and `[6, 5]`. The minimums are 4, 1, and 5 respectively. Their sum is 4 + 1 + 5 = 10)*

Posted on - 23 Sept 2026
Company OAsAll ProblemsTopicsCompany InsightsOA CalendarInterview ExperiencesPremium
OAHelper

Built by students, for students - practice company-specific OAs, DSA sheets, and real interview experiences to land your dream role.

© 2026 OAHelper.in·Terms·Privacy·Refunds·Trust & Safety·Contact·
Ready to crack your next OA?

Practice company-specific questions trusted by thousands of students across India.

Start PracticingGo Premium
OA Practice·DSA·Placements

Disclaimer: OAHelper is an independent educational platform. We (oahelper.in) do not own the images or questions shown. Content is uploaded by users.