Lucid Motors Interview Question

Write an algorithm to accomplish some simple task, and give the time complexity of that algorithm. Propose approaches with different time/memory tradeoffs.