Enosis Solution Interview Question

Regarding basic programing and DS