Qubole interview question

Covered coding and logic