New
The Learning module is now live
See what's new
×
Question Bank
Learning
NEW
Pricing
Blog
Forum
HOT
JobRadar
Description
Solution
Discussion
Submissions
Ask AI
Question Bank
Microsoft
Coding Question
AI Insights
Quick Summary
Find an activation window that maximizes the number of covered test cases minus the window's duration.
The window must include at least two test cases, and the resulting efficiency can be negative.
Inputs are unsorted arrival times with values up to 10^9, requiring an efficient approach.
What This Tests
Sorting and index-based mathematical transformations
Reformulating optimization objectives to decouple variables
Single-pass scanning with running maximum tracking
Optimizing for large numerical ranges and constraints
Common Patterns
Sorting
Greedy
Collapse
Hint 1
Hint 2
What Interviewers May Ask Next
Ask AI Assistant
Ask AI Assistant
Ask me anything about this coding question!
Qwen
Qwen3.7-Flash
0/2000
Auto
Debug
Run
Submit
Test Cases
Input
Output
Expected