Nitra interview question

Solve a Leetcode-style medium difficulty coding problem focused on data structures and algorithms.