You are an IT company's manager. Based on their performance over the last N working days, you must rate your employee. You are given an array of N integers called workload, where workload[i] represents the number of hours an employee worked on an ith day. The employee must be evaluated using the following criteria:
You are given an integer N where N represents the number of working days. You are given an integer array workload where workload[i] represents the number of hours an employee worked on an ith day.
Task
Determine the employee rating.
Example
Assumptions
Approach
Workload with consecutive hours > 6 = [2, 3, 7, 8, 7, 6, 3, 8, 12, 11, 12, 10] => Longest Interval = [8,12,11,12,10]
Therefore return 5.
Function description
Complete the Solve() function provided in the editor below that takes the following arguments and returns the employee rating:
Input format
Output format
Print the employee rating.
Constraints
1≤N≤105
1≤workload[i]≤12
Assumption
Approach
Therefore we will return 3 as an answer.