Accenture Interview Question

this technical interview is more like live coding interview