Skip to content
LC-2798 Easy LeetCode

2798. Number of Employees Who Met the Target

Read the full problem statement on LeetCode.
Difficulty: easy Acceptance: 88% Topics: Array
View full problem on LeetCode

Reading material

Reference solution (spoiler · python)
# Time:  O(n)
# Space: O(1)

# array
class Solution(object):
    def numberOfEmployeesWhoMetTarget(self, hours, target):
        """
        :type hours: List[int]
        :type target: int
        :rtype: int
        """
        return sum(x >= target for x in hours)

Solution from kamyu104/LeetCode-Solutions · MIT