Deloitte Interview Question

Coding for looping Coding for replace character