Ericsson interview question

OOPs