Macquarie Group Interview Question

some basics OOPs question and basic dsa question