Infosys Interview Question

Coding assessment part 2: algorithm (similar to leetcode)