Pregunta de entrevista de Macquarie Group

some basics OOPs question and basic dsa question