Company: Salesforce_24may
Difficulty: medium
Annual Salesforce Hackathon Problem Description At Salesforce's annual hackathon the n employees of a team stand in a line, and each one is rated with an efficiency score. The scores are given as an array efficiency of length n , where efficiency[i] is the score of the i -th employee in the line. The team lead picks one reference employee, identified by a 1-based index k , and wants to know how many contiguous groups of employees are centred on that person: a group qualifies when its length is odd and the median of its efficiency scores is exactly efficiency[k] . Given efficiency and k , count the subarrays of odd length whose median equals efficiency[k] . Complete the function getSpecialSubarrays , which takes the array efficiency and the integer k and returns the number of such subarrays. Input Format The first line contains a single integer n , the number of employees. Each of the next n lines contains a single integer; the i -th of these lines is efficiency[i] . The last line