EPAM Systems interview question

Leet Code easy task was assigned