OnePoint Global interview question

basic oops