Autodesk interview question

Leetcode Easy OOPS and pior experience