EPAM Systems interview question

n+1 problem