Dunzo Interview Question

Sequential Question - codeforces Medium/Hard question from leetcode