Ananya Solutions interview question

mostly on basics