Count Balancing Elements in an Array

Company: Publicis_Sapient___

Difficulty: medium