Whenever you're ready, walk me through how you'd approach this.
What is the time and space complexity of your solution, and how could it be improved?