Company: Rubrik_8nov

Difficulty: medium

Problem Statement

Data Durability Window Analysis Problem Description At a cloud backup provider, keeping customer data durable is the top priority. Engineers monitor many data segments across a customer's environment, and each segment carries a 'Data Durability Score' — a higher score means the segment is more resilient and better protected. The team is interested in 'Data Durability Windows': contiguous runs of these segments. For any such window, its 'Minimum Durability' is just the lowest score found inside it — the weakest link of that stretch. Your task is to help the engineers understand the overall durability posture. For every possible length k (from 1 up to N), you need to find the highest possible Minimum Durability that can be achieved across all Data Durability Windows of that specific length k. For example, given `durabilityScores = [10, 20, 10]`: Length 1: The best "Minimum Durability" is 20 (from [20]). Length 2: The best "Minimum Durability" is 10 (from [10, 20] or [20, 10], min is 10).

More Rubrik_8nov OA questionsInterview experiences