Whenever you're ready, walk me through how you'd approach this.
What were the trade-offs between performance and code complexity in your implementation?