Autodesk Interview Question

DSA question