2798. Number of Employees Who Met the Target ¶ Time: $O(n)$ Space: $O(1)$ C++JavaPython 1 2 3 4 5 6 7class Solution { public: int numberOfEmployeesWhoMetTarget(vector<int>& hours, int target) { return ranges::count_if(hours, [target](int hour) { return hour >= target; }); } }; 1 2 3 4 5class Solution { public int numberOfEmployeesWhoMetTarget(int[] hours, int target) { return (int) Arrays.stream(hours).filter(hour -> hour >= target).count(); } } 1 2 3class Solution: def numberOfEmployeesWhoMetTarget(self, hours: list[int], target: int) -> int: return sum(hour >= target for hour in hours)