EPAM Systems Interview Question

they asked basic to medium level leetcode