Autodesk Interview Question

Simple algorithms questions.