Bloomberg Interview Question

They weren’t clear, but something with an array search