Hacker's Team
Problem Overview
- Given arrays team_a and team_b, find the longest subarray [i..j] where picking at each index either value creates a non-decreasing sequence.
- Input: two integer arrays of length n (up to 1e5), values up to 1e9; Output: the maximum length (j - i + 1).
- Real-world context: forming a cyber security hackers team with non-decreasing skill levels.
- This Citadel interviews coding interview problem is a common interview question about subarray selection and constraints.
Example
Unlock to view complete problem details
and practice with sample input/output
Was this article helpful?
View Test Cases & Run Code requires membership
Input Variables
Execution Result:
