NextXAP Interview Question

Coding assignment is tricky