Statum interview question

Coding challenge with theory in between