Accenture Interview Question

2 pointer question for coding round