Health Gorilla Interview Question

Basic algorithm question about a balanced array.