Skip to content

Latest commit

 

History

History
22 lines (18 loc) · 474 Bytes

Question_2798.md

File metadata and controls

22 lines (18 loc) · 474 Bytes

LeetCode Records - Question 2798 Number of Employees Who Met the Target

Attempt 1: Use a loop

class Solution {
    public int numberOfEmployeesWhoMetTarget(int[] hours, int target) {
        int count = 0;
        
        for (int hour : hours) {
            if (hour >= target) {
                count++;
            }
        }

        return count;
    }
}
  • Runtime: 0 ms (Beats: 100.00%)
  • Memory: 42.53 MB (Beats: 10.77%)