Publicis Sapient interview question

2 dsa question array based medium