Company: Amazon_12oct
Difficulty: medium
Query Process Activity Problem Description You are a developer at Amazon evaluating the performance of processing units. There are n processes, and process i runs during every second from starts[i] to ends[i] , both inclusive. You are given q queries, each described by three arrays: query_process[j] : the exact number of processes to check for, query_start[j] : the first second of the query interval, query_end[j] : the last second of the query interval. For each query j , determine how many integer seconds t with query_start[j] <= t <= query_end[j] have exactly query_process[j] processes running at second t . Complete the function getQueryAnswers with the following parameters: starts : an array of n integers, the starting second of each process ends : an array of n integers, the ending second of each process query_process : an array of q integers, the process count asked for in each query query_start : an array of q integers, the first second of each query interval query_end : an