Algorithm · Amazon · Easy
You are given an array of ratings, one per instance. Find the largest integer k for which at least k of the instances have a rating that is greater than or equal to k, and return it. Interview Notes This was the first problem of a two-problem SDE intern online assessment (September 2026). The second problem in that assessment is a greedy package-split problem. Points worth clarifying up front: whether ratings can be zero or can exceed the number of instances, and what to…