Practice Number of Employees Who Met the Target
Read the task, work through the examples, and check your approach against the constraints. Use the original LeetCode task for coding and submissions.
Problem Statement
There are n employees in a company, numbered from 0 to n - 1. Each employee i has worked for hours[i] hours in the company. The company requires each employee to work for at least target hours. You are given a 0-indexed array of non-negative integers hours of length n and a non-negative integer target. Return the integer denoting the number of employees who worked at least target hours.
Source: Number of Employees Who Met the Target on LeetCode. Use the original task for its coding environment and submissions.
Examples
# Example 1
hours = [0,1,2,3,4], target = 2
3
# Example 2
hours = [5,1,4,2,2], target = 6
0
Constraints
Related LeetCode Problems
Practice more problems similar to Number of Employees Who Met the Target.
Review your practice with PhantomCodeAI
After trying the problem yourself, use the app to discuss your approach, complexity, and edge cases.