Company: Barclays BA4 role_1may
Difficulty: medium
You are appointed as head of the civil authority of your locality. Your task is to find out the number of good citizens in your locality. You are given an array Behaviour where Behaviour[i] denotes the Behaviour of i th Citizen in the locality. A citizen can be considered a good citi zen if th e Behaviour of that citizen is greater th an the average of two n eighbourin g citiz ens: B ehaviour[i] > ( Behavio ur[i-1] + Behavio ur[i+1] ) / 2. Note: If Behaviour[i+1] or Behaviour[i-1] does not exist, they should be considered zero. You are given an integer N where N represents the total number of citizens in the locality. You are given an array of positive integers Behaviour where Behaviour[i] represents the Behaviour of i th Citizen in the locality. Find out the number of good citizens in your locality. Function description Complete the Solve() function. This function takes the following 2 arguments and returns the number of good citizens in your locality: N : Represents th e total num