HENNGE interview question

Coding with either solve in go or python