Bloomberg Interview Question

I got 2 LC Mid Questions for technical interview