Get Largest Index Length
Problem Overview
- Find the largest set of indices where feature1 and feature2 maintain the same strict ordering for every pair; equal feature1 values among chosen indices are not allowed.
- Input: two integer arrays, feature1 and feature2. Output: an integer giving the maximum length of such an index set.
- Real-world context: identifying outlier-free subsets in co-related features for data analysis.
- This Amazon coding interview problem is a common interview question focused on ordering constraints in paired data.
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:
