1p3a Experience · Oct 2025

Microsoft Online Assessment: Adjusting Pixel Intensities for Visibility

SWE OA Easy
2 replies

Interview Experience

The following content requires a score higher than 200. You can already view this. This is a Microsoft Online Assessment (OA) question, relatively easy; simply take the global maximum value for each c

Full Details

The following content requires a score higher than 200. You can already view this. This is a Microsoft Online Assessment (OA) question, relatively easy; simply take the global maximum value for each column from top to bottom and add one. You have a grid-like representation of an image with n rows and m columns, where each cell contains a pixel intensity value. Your goal is to adjust the pixel intensities to improve object visibility. Each pixel at position (i, j) has an intensity value pixelIntensity[j], where 0 ≤ i < n and 0 ≤ j < m. The requirement is that no pixel in the previous rows of the same column should have a brightness greater than or equal to the current pixel. You can increase a pixel's intensity at a cost of one unit per unit of increase. Determine the minimum total cost to achieve the desired intensity pattern across all pixels.

About This Question

This is a candidate experience report from a microsoft interview for a swe role during the oa round reported in 2025.

It covers the following topics: Matrix .

Difficulty rating: Easy

Topics