Pergunta de entrevista da empresa Macquarie Group

some basics OOPs question and basic dsa question