EPAM Systems Interview Question

System design and sudo code