Add Q2 answer

Please review, thanks!
Also, I tried to fully conform to the style guide, please let me know if there's anything I'm missing.
This can be moved to the top to avoid allocating an unused tmp var.