Apple interview question

Questions related to oops and DSA