Segantii Interview Question

Pair programming. Questions from Leetcode