Lineaje interview question

Basic question in data structures & alogirthms