FWIW, that's typically the structure that Amazon is looking for in an interview (though, some interviewers are better/worse than others)
- start with the super inefficient solution, solve it pretty quickly
- point out performance problems or edge cases that would need to be solved for a larger scale solution
- go implement those optimizations