DXC Technology Interview Question

Solve a coding problem