Confianz Global interview question

Oops concepts and also a pseudocode based qn