Yandex Interview Question

Some problems from leetcode with different difficulties