Go solution for #3
Go solution for #6
Simplified Go solution for #6