CoverGo interview question

Mostly about logic and coding