Infosys | off campus | OA Questions | Balanced Light Strip | Strings Inversions

Infosys · Question · Posted Apr 2026

Question 1: Easy : Balanced Light Strip Activation Problem Statement: You are given a strip of N lights arranged linearly. Each light has an associated intensity value. You process the lights strictly from left to right. For each light, you may choose to activate it or skip it. When a light is activated: Its intensity is added to the total glow. However, if the difference between its intensity and the nearest already-activated light's intensity is greater than K, the system ...

The full answer & interview discussion are available to premium members.

Log in Create a free account