Company: Morgan stanley_21feb
Difficulty: medium
Maximum Light Intensity Sections Problem Description Write an algorithm to help a lighting crew locate the sections of a stage that hold the maximum total light intensity without going over a required scene light intensity. A venue hired a lighting crew to prepare a stage for an upcoming play. The show's director wants specific parts of the stage to hit a particular light intensity, referred to as the scene light. Because the budget won't stretch to any new fixtures, the crew must work only with the lights already rigged. The crew is handed a grid describing how much light currently falls on each section of the stage, laid out as an N x M matrix where each cell's value is the light intensity in that section. That value can be negative or positive — a negative value marks a dark spot and a positive value marks a bright spot. The crew needs to identify the section (or contiguous group of sections) whose light intensities sum to the largest possible total that still does not exceed the de