LVIS interview question

Got a coding assessment with a leetcode hard problem