NICE Actimize interview question

Leetcode - Easy - Medium