Quest Global interview question

Oops concepts