SPINNY Hiring | Off-Campus OA (2024) | Number of Employees Who Met the Target

Question · Posted Jun 2026

Problem Statement You are given an integer array hours where hours[i] represents the number of hours worked by the i-th employee, and an integer target. Return the number of employees who worked at least target hours. Example Input hours = [0,1,2,3,4] target = 2 Output 3 Explanation Employees with hours ≥ 2: 2, 3, 4 Total = 3 Constraints 1 <= hours.length <= 50 0 <= hours[i] <= 10^5 0 <= target <= 10^5

The full answer & interview discussion are available to premium members.

Log in Create a free account