Statum Interview Question

Coding challenge with theory in between