Your question is Time vs Space Complexity Tradeoffs. Take a moment with it on the right.
Talk me through your thinking if you like. When you're confident, submit your answer and I'll grade it like a real screen (7/10 or better passes).
How do you evaluate time and space complexity tradeoffs when solving an algorithmic problem? Walk through how you would choose between a slower low-memory approach and a faster higher-memory one.