Shubh Solutions interview question

Basic oops and logical questions