EPAM Systems interview question

Technical questions and simple algorithmic task, was need to describe solution