Bloomberg Interview Question

The first round medium question was based on array and other question was based on graph.