Accenture interview question

2 pointer question for coding round