Whenever you're ready, walk me through how you'd approach this.
Given a coding solution, explain its time complexity and space complexity. Describe how you derive the result and what operations dominate the overall cost.