0% found this document useful (0 votes)
1 views1 page

Leetcode

The document contains a Java class named 'Solution' that includes a method 'numberOfEmployeesWhoMetTarget'. This method takes an array of integers representing hours worked by employees and an integer target, counting how many employees met or exceeded the target hours. It returns the count of such employees.

Uploaded by

thepsyforge
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
1 views1 page

Leetcode

The document contains a Java class named 'Solution' that includes a method 'numberOfEmployeesWhoMetTarget'. This method takes an array of integers representing hours worked by employees and an integer target, counting how many employees met or exceeded the target hours. It returns the count of such employees.

Uploaded by

thepsyforge
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1

class Solution {

public int numberOfEmployeesWhoMetTarget(int[] hours, int target) {


int c=0;
for(int i=0;i<hours.length;i++){
if(hours[i]>=target){
c++;
}
}
return c;
}
}

You might also like