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.
Just a note. I'm ok with the style but some people prefer checking if a pointer is null using if (ptr) and if (!ptr)