diff --git a/CPP/NNumber_of_Employees_Who_Met_the_Target.cpp b/CPP/NNumber_of_Employees_Who_Met_the_Target.cpp new file mode 100644 index 0000000..a93cd23 --- /dev/null +++ b/CPP/NNumber_of_Employees_Who_Met_the_Target.cpp @@ -0,0 +1,9 @@ +class Solution { +public: + int numberOfEmployeesWhoMetTarget(vector& hours, int target) { + return count_if(hours.begin(),hours.end(),[target](int hour){ + return hour >= target; + } + ); + } +};