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.
Try to avoid global vars. You can provide function to return a new list.