DXC Technology Interview Question

Introduction, then one coding question(medium-hard)