EY Interview Question

Pattern printing, Reverse a string