Motive Interview Question

about time complexity problem solving