Find Maximum Beauty
Easydeshaw
Problem Overview
- Find the maximum beauty (number of i with a[i] = i, 1-indexed) by deleting elements while keeping order.
- Input: integer array arr; Output: integer maximum beauty; constraints unspecified.
- Operation: delete elements repeatedly (you may stop anytime), leaving a subsequence; order must remain.
- Domain: array manipulation and index alignment; common coding interview problem.
- This interview question is from Deshaw interviews.
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:
