Microsoft Online Assessment Question | Dynamic Programming

Result
Offer
Posted
25 Aug 2025
297 reads

Summary

I recently faced a dynamic programming problem during my Microsoft online assessment. The problem involved selecting articles to maximize intellectual value while respecting a page limit. It was a variation of the knapsack problem, which I solved using dynamic programming.

How it went

I was preparing for my Microsoft online assessment when I encountered this dynamic programming question. The problem required me to select a subset of articles to maximize the total intellectual value without exceeding the page limit. I approached it by considering the knapsack problem variation, where each article has a weight (pages) and value (intellectual value). I used a dynamic programming approach to keep track of the maximum value achievable for each possible page count.

Questions asked (1)

  1. 01

    Maximize Intellectual Value with Page Limit

    Data Structures & Algorithms · Hard

    You are given a set of articles, where each article i requires 2 * A[i] pages to be read completely and provides an intellectual value of I[i]. You can read at most p pages in total, and your task is to select a subset of articles such that the total number of pages read does not exceed p, while maximizing the total intellectual value gained.

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!