EPAM Systems interview question

Npm, leetcode medium